Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted

2020-11-30 Thread Michael Paquier
On Tue, Dec 01, 2020 at 04:06:48PM +1300, Thomas Munro wrote: > I felt on balance it was a "bug", since it causes operational > difficulties for people and was clearly not our intended behaviour, > and I announced this intention 6 weeks ago. Oops, sorry for missing this discussion for such a long

Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted

2020-11-30 Thread Thomas Munro
On Tue, Dec 1, 2020 at 3:55 PM Michael Paquier wrote: > On Mon, Nov 30, 2020 at 06:59:40PM +1300, Thomas Munro wrote: > > So I fixed that, by adding a return value to do_truncate() and > > checking it. That's the version I plan to commit tomorrow, unless > > there are further comments or objectio

Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted

2020-11-30 Thread Michael Paquier
On Mon, Nov 30, 2020 at 06:59:40PM +1300, Thomas Munro wrote: > So I fixed that, by adding a return value to do_truncate() and > checking it. That's the version I plan to commit tomorrow, unless > there are further comments or objections. I've also attached a > version suitable for REL_11_STABLE

Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted

2020-11-30 Thread Thomas Munro
On Mon, Nov 30, 2020 at 6:59 PM Thomas Munro wrote: > On Wed, Nov 25, 2020 at 8:00 AM Pavel Borisov wrote: > > The new status of this patch is: Ready for Committer > ... That's the version I plan to commit tomorrow, unless > there are further comments or objections. ... Done, and back-patched

Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted

2020-11-29 Thread Thomas Munro
On Wed, Nov 25, 2020 at 8:00 AM Pavel Borisov wrote: > The new status of this patch is: Ready for Committer Thanks! One small thing bothered me about the last version of the patch. It tried to unlink when ENOENT had already been enountered by open(2), so COMMIT of a DROP looks like: openat(AT_

Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted

2020-11-24 Thread Pavel Borisov
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:not tested Given we got two other reviews from Neil and David, I think I can fin

Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted

2020-11-24 Thread David Zhang
I verified the patch "v2-0001-Free-disk-space-for-dropped-relations-on-commit.patch" on master branch "0cc9932740f2bf572303b68438e4caf62de9". It works for me. Below is my test procedure and results. === Before the patch === #1 from psql console 1, create table and index then insert enough d

Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted

2020-11-20 Thread Nail Carpenter
Yes, It's my fault. You're right. Pavel Borisov 于2020年11月19日周四 下午11:55写道: > One thing that doesn't matter is that the modify here seems unnecessary, >> right? >> >> > mdunlinkfork(RelFileNodeBackend rnode, ForkNumber forkNum, bool isRedo) >> > { >> > char *path; >> > - int

Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted

2020-11-19 Thread Pavel Borisov
> > One thing that doesn't matter is that the modify here seems unnecessary, > right? > > > mdunlinkfork(RelFileNodeBackend rnode, ForkNumber forkNum, bool isRedo) > > { > > char *path; > > - int ret; > > + int ret = 0; > > path = relpath(rnode, f

Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted

2020-11-19 Thread Neil Chen
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:not tested Hi, I have tested the feature and it worked well. One thing that doe