how much disk space does a VACUUM FULL take? - Mailing list pgsql-general

From john gale
Subject how much disk space does a VACUUM FULL take?
Date
Msg-id 112C77C0-FBDA-4AFD-9956-250E83097182@smadness.com
Whole thread Raw
Responses Re: how much disk space does a VACUUM FULL take?  (Andreas Brandl <ml@3.141592654.de>)
Re: how much disk space does a VACUUM FULL take?  (Vick Khera <vivek@khera.org>)
Re: how much disk space does a VACUUM FULL take?  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
Due to running low on disk space, we have recently removed a majority of rows from a table to an archival DB.

Although VACUUM allows disk space to be re-used, VACUUM FULL is the only one that actively reclaims disk space for use
bythe OS.  http://www.postgresql.org/docs/9.0/static/routine-vacuuming.html 

For a variety of reasons I would prefer disk usage to be as low as possible, thus I would like to run a VACUUM FULL
duringsome maintenance cycle (since it exclusively locks the table).  However, given the details of VACUUM FULL: 

> VACUUM FULL actively compacts tables by writing a complete new version of the table file with no dead space. This
minimizesthe size of the table, but can take a long time. It also requires extra disk space for the new copy of the
table,until the operation completes. 

Does this suggest that VACUUM FULL needs free disk space on the order of the full size of the table that it's vacuuming
tobe able to complete?  Or does it / can it write the filesystem files in the 1GB chunks stored in /base while removing
thenew "unused" files at the same time, thus requiring only a few GB of free space? 

thanks,

    ~ john


pgsql-general by date:

Previous
From: Steven Schlansker
Date:
Subject: Timing for release with fix for "Nov2013ReplicationIssue"
Next
From: Tom Lane
Date:
Subject: Re: Timing for release with fix for "Nov2013ReplicationIssue"