Re: When will my database crash?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: When will my database crash?
Date: 2004-09-08 04:41:56
Message-ID: 15658.1094618516@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Christopher Browne <cbbrowne(at)acm(dot)org> writes:
> Not vacuuming for four months was a severe error, which means that you
> now need to run a really full maintenance cycle. At the next possible
> opportunity, you really need to do a VACUUM FULL on the whole
> database.

Dump, initdb, reload would very likely be less painful ...

Something that hasn't ever been very clearly documented is that the
VACUUM FULL mechanism is designed for compacting out relatively small
amounts of dead space, like maybe 10-20%. When you've got a table
that's got so much dead space that VACUUM FULL is going to move nearly
all the live rows, the proposition is a loser. CLUSTER or dump/reload
will be better, because those approaches don't bother to try to maintain
the existing indexes incrementally: they throw away the indexes and
start from scratch.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kostis Mentzelos 2004-09-08 07:37:50 Re: Alternate db location
Previous Message Christopher Browne 2004-09-08 03:22:31 Re: When will my database crash?