1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-25 20:23:07 +03:00

Force VACUUM to recalculate oldestXmin even when we haven't changed our

own database's datfrozenxid, if the current value is old enough to be
forcing autovacuums or warning messages.  This ensures that a bogus
value is replaced as soon as possible.  Per a comment from Heikki.
This commit is contained in:
Tom Lane
2009-09-01 04:46:49 +00:00
parent 14f445fccf
commit 794e3e81a0
3 changed files with 22 additions and 12 deletions

View File

@@ -13,7 +13,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.392 2009/09/01 02:54:51 alvherre Exp $
* $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.393 2009/09/01 04:46:49 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -893,9 +893,10 @@ vac_update_datfrozenxid(void)
/*
* If we were able to advance datfrozenxid, see if we can truncate pg_clog.
* Also do it if the shared XID-wrap-limit info is stale.
* Also do it if the shared XID-wrap-limit info is stale, since this
* action will update that too.
*/
if (dirty || !TransactionIdLimitIsValid())
if (dirty || ForceTransactionIdLimitUpdate())
vac_truncate_clog(newFrozenXid);
}