From: Jerry Sievers <gsievers19@comcast.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alban Hertroys <alban.hertroys@apollovredestein.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Reclaiming space for dropped database
Date: Wed, 23 Jan 2019 13:36:56 -0600
Message-ID: <87o987upwn.fsf@jsievers.enova.com> (raw)
In-Reply-To: <26693.1548255721@sss.pgh.pa.us>
References: <OF9EBAB443.ED042896-ONC125838B.0044C814-C125838B.0044F800@apollotyres.com>
<26693.1548255721@sss.pgh.pa.us>
Tom Lane <tgl@sss.pgh.pa.us> writes:
> 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
Yeah. IIRC, it renames control to pg_control.old to avoid accidental
startup.
> just "rm -rf ./10", not only its biggest subdirectory.
>
> regards, tom lane
>
>
--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
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: gsievers19@comcast.net, tgl@sss.pgh.pa.us, alban.hertroys@apollovredestein.com
Subject: Re: Reclaiming space for dropped database
In-Reply-To: <87o987upwn.fsf@jsievers.enova.com>
References: <OF9EBAB443.ED042896-ONC125838B.0044C814-C125838B.0044F800@apollotyres.com> <26693.1548255721@sss.pgh.pa.us> <87o987upwn.fsf@jsievers.enova.com>
* 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