Re: vacuum confusion

From: John Sidney-Woollett <johnsw(at)wardbrook(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: postgres general <pgsql-general(at)postgresql(dot)org>
Subject: Re: vacuum confusion
Date: 2005-02-11 11:11:48
Message-ID: 420C92F4.8060807@wardbrook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've just noticed that the v8 docs are MUCH better in explaining this
than the 7.4.6 docs that I'm using (since I'm using 7.4.6 in production).

Perhaps if the same texts

<QUOTE>
play=# VACUUM;
WARNING: some databases have not been vacuumed in 1613770184 transactions
HINT: Better vacuum them within 533713463 transactions, or you may have
a wraparound failure.
VACUUM
</QUOTE>

and warning

<QUOTE>
To be sure of safety against transaction wraparound, it is necessary to
vacuum every table, including system catalogs, in every database at
least once every billion transactions. We have seen data loss situations
caused by people deciding that they only needed to vacuum their active
user tables, rather than issuing database-wide vacuum commands. That
will appear to work fine ... for a while.
</QUOTE>

were added to the 7.4.x docs that would help others too.

Thanks

John Sidney-Woollett

Richard Huxton wrote:

> John Sidney-Woollett wrote:
>
>> Ah.., no we're not vacuuming template0 or 1.
>>
>> I didn't realise that the transaction ID would be stored here - I
>> assumed that they'd be in our database.
>>
>> Do I need to need to (plain) vacuum, or vacuum full these template0
>> and template1? And is this something that can be done once a week
>> rather than every night (like our main database)?
>
>
> Ah! Found the section of the manuals - see "Routine Database Maintenance
> Tasks" for details.
>
> AFAIK it's a simple vacuum and once a week is more than enough. The
> manual recommends once every 500million transactions, though you can
> leave it longer.
>
> --
> Richard Huxton
> Archonet Ltd
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John Sidney-Woollett 2005-02-11 11:13:17 Re: vacuum confusion
Previous Message David Goodenough 2005-02-11 11:07:24 SQL query