pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: AP <ap@zip.com.au>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15582: ALTER TABLE/INDEX ... SET TABLESPACE does not free disk space
Date: Thu, 10 Jan 2019 14:58:22 +1100
Message-ID: <20190110035821.x54pyf4krnri2u4s@zip.com.au> (raw)
In-Reply-To: <20190109160728.cmcnkf4x2hnqb4lr@alap3.anarazel.de>
References: <15582-dae8ba537137883d@postgresql.org>
	<20190109160728.cmcnkf4x2hnqb4lr@alap3.anarazel.de>

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




view thread (8+ messages)  latest in thread

Message-ID: <20190110035821.x54pyf4krnri2u4s@zip.com.au>
Permalink:  ../20190110035821.x54pyf4krnri2u4s@zip.com.au/
Also on:    postgresql.org/message-id/20190110035821.x54pyf4krnri2u4s@zip.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: ap@zip.com.au, andres@anarazel.de
  Subject: Re: BUG #15582: ALTER TABLE/INDEX ... SET TABLESPACE does not free disk space
  In-Reply-To: <20190110035821.x54pyf4krnri2u4s@zip.com.au>
  References: <15582-dae8ba537137883d@postgresql.org> <20190109160728.cmcnkf4x2hnqb4lr@alap3.anarazel.de> <20190110035821.x54pyf4krnri2u4s@zip.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox