Betr: Re: Reclaiming space for dropped database

From: Alban Hertroys <alban(dot)hertroys(at)apollovredestein(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Betr: Re: Reclaiming space for dropped database
Date: 2019-01-23 16:22:23
Message-ID: OF220AF36E.24C40116-ONC125838B.0059C625-C125838B.0059F080@apollotyres.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote on 2019-01-23 16:02:01:

> Alban Hertroys <alban(dot)hertroys(at)apollovredestein(dot)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.

That explains what I'm seeing. After creating a dump (better safe than
sorry), I'll remove that directory.

Thanks!

Regards,
Alban.

Alban Hertroys
D: +31 (0)53 4 888 888 | T: +31 (0)53 4888 888 | E: alban(dot)hertroys(at)apollovredestein(dot)com
Apollo Vredestein B.V.| Ir. E.L.C. Schiffstraat 370, 7547 RD Enschede, The
Netherlands
Chamber of Commerce number: 34223268




The information contained in this e-mail is intended solely for the use of the
individual or entity to whom it is addressed. If you are not the intended
recipient, you are hereby notified that any disclosure, copying, distribution
or action in relation to the contents of this information is strictly
prohibited and may be unlawful and request you to delete this message and any
attachments and advise the sender by return e-mail. The confidentiality of this
message is not warranted. Apollo Vredestein and its subsidiaries rule out any
and every liability resulting from this or any other electronic transmission



Please consider the environment before printing this e-mail

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Voras 2019-01-23 17:58:54 Monitoring PITR recovery progress
Previous Message Josef Machytka 2019-01-23 15:05:32 Re: PostgreSQL logical replication depends on WAL segments?