Re: VACUUM FULL memory requirements

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "David Schnur" <dnschnur(at)gmail(dot)com>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: VACUUM FULL memory requirements
Date: 2009-12-14 18:50:40
Message-ID: 4B2634A0020000250002D42D@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

David Schnur <dnschnur(at)gmail(dot)com> wrote:

> Regular VACUUM is fine most of the time; it frees up space for
> re-use, the space gets re-used, and the disk size stays constant.
> But at certain non-predictable points in time, the database may
> expire several times more rows than usual, and in that case I want
> to reclaim the space for the OS, since it may not be used by the
> database again for some time.

If you actually expect it to be re-used by the database sometime
later, I would just stick with normal VACUUM (with adequate fsm
settings). The only counter-argument the jumps out at me is that
you have some actual need to use that space in the interim and you
can ensure that you're done with it and free it up before the
database needs it again.

Well, I guess if there could be another reason: is there a
performance improvement from the VACUUM FULL and REINDEX which makes
it worth the cost of such aggressive maintenance? Even if so,
CLUSTER might help more (because of ordering the data) if you have
the disk space to support it. Otherwise, you might want to try
pg_dump and a restore to see if you can get the equivalent of the
VACUUM FULL faster.

-Kevin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David Schnur 2009-12-14 19:14:58 Re: VACUUM FULL memory requirements
Previous Message Greg Stark 2009-12-14 18:34:01 Re: VACUUM FULL memory requirements