Re: pg_autovacuum and VACUUM FREEZE - Mailing list pgsql-hackers

From Matthew T. O'Connor
Subject Re: pg_autovacuum and VACUUM FREEZE
Date
Msg-id 1066313085.7295.10.camel@zeutrh9
Whole thread Raw
In response to pg_autovacuum and VACUUM FREEZE  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: pg_autovacuum and VACUUM FREEZE
Re: pg_autovacuum and VACUUM FREEZE
List 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




pgsql-hackers by date:

Previous
From: Christopher Browne
Date:
Subject: Re: pg_autovacuum and VACUUM FREEZE
Next
From: Tom Lane
Date:
Subject: Re: pg_autovacuum and VACUUM FREEZE