pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alban Hertroys <alban.hertroys@apollovredestein.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Reclaiming space for dropped database
Date: Wed, 23 Jan 2019 10:02:01 -0500
Message-ID: <26693.1548255721@sss.pgh.pa.us> (raw)
In-Reply-To: <OF9EBAB443.ED042896-ONC125838B.0044C814-C125838B.0044F800@apollotyres.com>
References: <OF9EBAB443.ED042896-ONC125838B.0044C814-C125838B.0044F800@apollotyres.com>

Alban Hertroys <alban.hertroys@apollovredestein.com> writes:
> Our current development database server is running a bit low on diskspace, 
> so I dropped an old but rather large database with the intention of 
> claiming back some space. However, the space remains claimed.
> This server was upgraded from PG10 to PG11 using pg_upgrade's --link 
> option.

If you used --link, then all the files would remain hard-linked from both
the old and new database directories.  You've got to remove them from the
old DB directory as well.

There's not really any point in keeping around the source DB directory
once you've completed a --link migration.  Starting the postmaster in
the old DB directory would be disastrous because the files are
inconsistent from its standpoint once the new postmaster has modified
them at all.  (In fact, I think pg_upgrade intentionally makes the old
directory non-runnable to prevent that error.)  So you might as well
just "rm -rf ./10", not only its biggest subdirectory.

			regards, tom lane




view thread (3+ messages)  latest in thread

Message-ID: <26693.1548255721@sss.pgh.pa.us>
Permalink:  ../26693.1548255721@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26693.1548255721@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, alban.hertroys@apollovredestein.com
  Subject: Re: Reclaiming space for dropped database
  In-Reply-To: <26693.1548255721@sss.pgh.pa.us>
  References: <OF9EBAB443.ED042896-ONC125838B.0044C814-C125838B.0044F800@apollotyres.com> <26693.1548255721@sss.pgh.pa.us>

* 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