From: Tom Lane <tgl@sss.pgh.pa.us>
To: scott.marlowe <scott.marlowe@ihs.com>
Cc: Chris Miles <chris_pg002@psychofx.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Does VACUUM ever free up any disk space?
Date: Thu, 11 Sep 2003 17:02:27 -0400
Message-ID: <1380.1063314147@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.33.0309111316370.19197-100000@css120.ihs.com>
References: <Pine.LNX.4.33.0309111316370.19197-100000@css120.ihs.com>
"scott.marlowe" <scott.marlowe@ihs.com> writes:
> On Thu, 11 Sep 2003, Chris Miles wrote:
>> I've read a lot where people recommend using VACUUM FULL
>> to free up disk space, especially after many updates/inserts.
> A regular vacuum since 7.2 never actually frees up space, it simply marks
> the space in the file as available for reuse. Note that in many
> circumstances this is actually better than freeing up the space, as it
> allows the database to store date without having to extend and possibly
> fragment the table.
Regular vacuum *will* shorten the table's file if (a) there are some
completely-empty pages at the end, and (b) it can get an exclusive lock
on the table without blocking. This might be a relatively rare
condition in a heavily-used table. But "never actually frees up space"
is incorrect.
You're correct that regular vacuum is designed around the idea of
maintaining a steady-state file size rather than trying very hard to
give space back to the OS.
regards, tom lane
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, scott.marlowe@ihs.com, chris_pg002@psychofx.com
Subject: Re: Does VACUUM ever free up any disk space?
In-Reply-To: <1380.1063314147@sss.pgh.pa.us>
References: <Pine.LNX.4.33.0309111316370.19197-100000@css120.ihs.com> <1380.1063314147@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