Re: pg_autovacuum and VACUUM FREEZE

From: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_autovacuum and VACUUM FREEZE
Date: 2003-10-16 14:04:45
Message-ID: 1066313085.7295.10.camel@zeutrh9
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2003-10-16 at 01:34, Christopher Kings-Lynne wrote:
> Hi,
>
> Was just wondering if pg_autovacuum watches transaction ids and issues a
> vacuum freeze before they roll over?

Yes pg_autovacuum monitors for xid wraparound, when it sees that you are
getting close, then it issues a database wide vacuum. I intentionally
chose not to do a vacuum freeze.

The vacuum man page says, "FREEZE is not recommnded for routine use".
That was enough to keep me away. However if vacuum freeze was
considerably lighter than normal database wide vacuums then there might
be an advantage to using it. Especially since when pg_autovaccum
decides it's time to deal with xid wraparound, it does it to all the
databases, which could a several hours of vacuum on large clusters.

Relevant section of man page below:

FREEZE is a special-purpose option that causes tuples to be marked
‘‘frozen’’ as soon as possible, rather than waiting until they are
quite old. If this is done when there are no other open transactions in
the same database, then it is guaranteed that all tuples in the
database are ‘‘frozen’’ and will not be subject to transaction ID
wraparound problems, no matter how long the database is left un-vacu-
umed. FREEZE is not recommended for routine use. Its only intended
usage is in connection with preparation of user-defined template
databases, or other databases that are completely read-only and will
not receive routine maintenance VACUUM operations. See the Administra-
tor’s Guide for details.

Matthew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-10-16 14:13:42 Re: pg_autovacuum and VACUUM FREEZE
Previous Message Christopher Browne 2003-10-16 11:40:32 Re: pg_autovacuum and VACUUM FREEZE