From: Florents Tselai <florents.tselai@gmail.com>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Table space not returned to the OS ?
Date: Mon, 27 Jun 2022 12:30:45 +0300
Message-ID: <35BEB990-A045-413D-8F0F-EA372754960C@gmail.com> (raw)
Hi,
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.
In the database itself, lots of things have changed since.
In fact, that database itself has been dropped at some point and restored from a backup.
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
The last modification date on that directory (../12/) appears to be around a month ago,
When the table with relied 16385 was in fact dropped.
Now, In my update scripts (I use this db as an OLAP) I occasionally run VACUUM.
Is it weird that the 886GB space hasn’t been returned to the OS yet?
What’s the safest way to return it to the OS manually?
Thanks
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: florents.tselai@gmail.com
Subject: Re: Table space not returned to the OS ?
In-Reply-To: <35BEB990-A045-413D-8F0F-EA372754960C@gmail.com>
References: <35BEB990-A045-413D-8F0F-EA372754960C@gmail.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