Re: Manual anti-wraparound vacuums - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Manual anti-wraparound vacuums
Date
Msg-id CA+TgmoZXCahbQ+1_VPBQrh9pJXZL9hNwT=D0UJykkJDk4vud4A@mail.gmail.com
Whole thread Raw
In response to Manual anti-wraparound vacuums  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Manual anti-wraparound vacuums
Re: Manual anti-wraparound vacuums
List pgsql-hackers
On Fri, Nov 11, 2011 at 9:59 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> In another thread, Alvaro quoted from the manual:
>>       If for some reason autovacuum fails to clear old XIDs from a table, the
>>       system will begin to emit warning messages like this when the database's oldest
>>       XIDs reach ten million transactions from the wraparound point:
>
>>       WARNING:  database "mydb" must be vacuumed within 177009986 transactions
>>       HINT:  To avoid a database shutdown, execute a database-wide VACUUM in "mydb".
>
>>       (A manual VACUUM should fix the problem, as suggested by the hint; but
>>       note that the VACUUM must be performed by a superuser, else it will fail to
>>       process system catalogs and thus not be able to advance the database's
>>       datfrozenxid.)
>
> It occurs to me to wonder how this scenario will interact with the
> recent changes to let VACUUM skip pages.  AFAIR there is not a way for a
> manual VACUUM to set the anti-wraparound mode, is there?

I tweaked Simon's original patch to address exactly this scenario;
VACUUM FREEZE prevents page-skipping behavior.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: why do we need two snapshots per query?
Next
From: "Albe Laurenz"
Date:
Subject: Re: Disable OpenSSL compression