pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Magnus Hagander <magnus@hagander.net>
To: Florents Tselai <florents.tselai@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: Table space not returned to the OS ?
Date: Mon, 27 Jun 2022 12:01:41 +0200
Message-ID: <a12948e8d6c6883cce42ffc6154ea48416770939.camel@cybertec.at> (raw)
In-Reply-To: <CABUevEyqi4fXp_yBvcJkJ5zKq_c1BTPDj+yzsvJ319Fr4Sk-Hg@mail.gmail.com>
References: <35BEB990-A045-413D-8F0F-EA372754960C@gmail.com>
	<CABUevEyqi4fXp_yBvcJkJ5zKq_c1BTPDj+yzsvJ319Fr4Sk-Hg@mail.gmail.com>

On Mon, 2022-06-27 at 11:38 +0200, Magnus Hagander wrote:
> On Mon, Jun 27, 2022 at 11:30 AM Florents Tselai <florents.tselai@gmail.com> wrote:
> > A few months back (October) I had upgraded a Postgres instance from v12 —> 14.
> > 
> > The database disk size under /var/lib/postgresql/12 was around 800GB+ back then.
> > Note, that IIRC I had used hard-linking during the upgrade.
> > 
> > As I was running out of disk space, I started investigating and found out that 
> > 
> > /var/lib/postgresql/12/main/base/16385  —>  886GB+ 
> > /var/lib/postgresql/14 —> 400GB
> 
> It looks like you didn't actually delete the old cluster, which you are supposed
> to do once you have verified that the new one works.

I think that it should be done earlier than that, namely immediately after running
pg_upgrade.  Once you have started the PostgreSQL 14 server (to verify that it works),
you can no longer use the old cluster.
Yes, the control file is crippled, but in my opinion, the earlier you delete the old
cluster, the safer.

Yours,
Laurenz Albe





view thread (6+ messages)  latest in thread

Message-ID: <a12948e8d6c6883cce42ffc6154ea48416770939.camel@cybertec.at>
Permalink:  ../a12948e8d6c6883cce42ffc6154ea48416770939.camel@cybertec.at/
Also on:    postgresql.org/message-id/a12948e8d6c6883cce42ffc6154ea48416770939.camel@cybertec.at

 · 

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-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, magnus@hagander.net, florents.tselai@gmail.com
  Subject: Re: Table space not returned to the OS ?
  In-Reply-To: <a12948e8d6c6883cce42ffc6154ea48416770939.camel@cybertec.at>
  References: <35BEB990-A045-413D-8F0F-EA372754960C@gmail.com> <CABUevEyqi4fXp_yBvcJkJ5zKq_c1BTPDj+yzsvJ319Fr4Sk-Hg@mail.gmail.com> <a12948e8d6c6883cce42ffc6154ea48416770939.camel@cybertec.at>

* 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