Re: BUG #15582: ALTER TABLE/INDEX ... SET TABLESPACE does not freedisk space - Mailing list pgsql-bugs

From AP
Subject Re: BUG #15582: ALTER TABLE/INDEX ... SET TABLESPACE does not freedisk space
Date
Msg-id 20190110035821.x54pyf4krnri2u4s@zip.com.au
Whole thread Raw
In response to Re: BUG #15582: ALTER TABLE/INDEX ... SET TABLESPACE does not freedisk space  (Andres Freund <andres@anarazel.de>)
Responses Re: BUG #15582: ALTER TABLE/INDEX ... SET TABLESPACE does not freedisk space  (AP <ap@zip.com.au>)
List pgsql-bugs
Hi,

On Wed, Jan 09, 2019 at 08:07:28AM -0800, Andres Freund wrote:
> Hi,
> 
> On 2019-01-09 02:21:48 +0000, PG Bug reporting form wrote:
> > I've added a tablespace recently to help deal with almost running out of
> > disk space.
> > 
> > I then tried to use it with:
> > 
> > ALTER TABLE schema.table SET TABLESPACE hydro2_tmp;
> > 
> > This worked in so far as disk space was used on hydro2_tmp but nothing was
> > ever freed in the default location.
> 
> If you restart postgres, is the space freed?

No. :(

> I suspect the issue is that we don't properly close the old relation in
> all backends that had it open, but it's hard to know for sure without
> that.  If restarting isn't feasible, ensuring all backends older than
> the move are ended, and issuing a CHECKPOINT; might also free the space
> after a few seconds.

I did a CHECKPOINT (it was fast) and it did not help. Then I did a restart
and space is still used.

AP


pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Is temporary functions feature official/supported? Found someissues with it.
Next
From: Michael Paquier
Date:
Subject: Re: BUG #15548: Unaccent does not remove combining diacriticalcharacters