Re: partial VACUUM FULL

From: Frank Finner <postgresql(at)finner(dot)de>
To: pgsql-general(at)postgresql(dot)org, Christopher Petrilli <petrilli(at)amber(dot)org>
Subject: Re: partial VACUUM FULL
Date: 2004-03-23 22:13:54
Message-ID: 20040323231354.4921207e.postgresql@finner.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I ran into the same problem. Did you try another VACUUM FULL after the first? It ran a lot faster
after the first initial one (about one magnitude faster), and now I do a VACUUM FULL every night.
Luckily we have the possibility of a downtime window at night so we may lock some tables then. In
earlier releases of PostgreSQL there was no option FULL, so I guess I didn´t realize the slightly
different behaviour of VACUUM and forgot to use the option FULL in 7.3.

I also ran into another trap yesterday with a very frequently updated database (some big tables are
dropped and copied from another database every few minutes): Some system tables became extremely
large after about 10 weeks. A VACUUM FULL did not cause any relief (repeatedly needed more than
15 minutes and used enormous amounts of memory, so the postmaster started heavily swapping), so I
dumped that database, dropped it, created it new and reloaded it. This worked fine (VACUUM FULL now
needs less than 30 seconds), and I was lucky to have a time window to drop/create, but I really
would like to know, if somebody knows a better way. This was with 7.3.5, I did not test that with
7.4.

Regards, Frank.

On Tue, 23 Mar 2004 16:24:15 -0500 Christopher Petrilli <petrilli(at)amber(dot)org> sat down, thought long
and then wrote:

> Unfortunately, with some things, and I'm not sure why, as I don't
> understand the VACUUM stuff that well, I had assumed that running
> VACUUM ANALYZE nightly would be enough. After I noticed that a
> specific database (very transient data) had bloated to nearly 7Gb, I
> ran VACUUM FULL on it, which took an hour or so, and it was reduced
> down to under 1GB.
>
> Is there a better way to deal with this? This is on 7.3, and I wonder
> if 7.4 fixed that, but it's been hard to schedule time to upgrade.
>
> Chris
> --
> | Christopher Petrilli
> | petrilli (at) amber.org
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings

--
Frank Finner

Memory follows memory, memory defeats memory; some things are banished
only into the realms of our rich imaginings - but this does not mean
that they do not or cannot or will not exist - they exist! They exist!
(M. Moorcock, "The Revenge Of The Rose")

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-03-23 22:45:24 Re: partial VACUUM FULL
Previous Message Tom Lane 2004-03-23 21:59:45 Re: linked list rewrite