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

From: Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>
To: Neil Chen <carpenter(dot)nail(dot)cz(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted
Date: 2020-11-19 15:54:54
Message-ID: CALT9ZEF+fJrPjxvi2fhBPZiTxdKMz7WO1j4LNdUH=6D8ZLyH4g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

>
> 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, forkNum

I suppose it is indeed necessary as otherwise the result of the comparison
is not defined in case of 'else' block in the mdunlinkfork() :
346 else
347 {
348 /* Prevent other backends' fds from holding on to the disk
space */
349 do_truncate(path);
.....
356 * Delete any additional segments.
357 */
358 if (ret >= 0)
----------^^^^^^^

--
Best regards,
Pavel Borisov

Postgres Professional: http://postgrespro.com <http://www.postgrespro.com>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2020-11-19 16:36:27 BUG #16731: pgAdmin v4.28 Will not load
Previous Message PG Bug reporting form 2020-11-19 15:41:24 BUG #16730: Create table like with inheritance and self referencing index

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2020-11-19 16:04:17 Re: Disable WAL logging to speed up data loading
Previous Message Tom Lane 2020-11-19 15:49:45 Re: Different results between PostgreSQL and Oracle for "for update" statement