diff options
| author | Tom Lane | 2009-09-01 04:46:49 +0000 |
|---|---|---|
| committer | Tom Lane | 2009-09-01 04:46:49 +0000 |
| commit | 1a7bbfe645b8379e368ec9969f99fee455e3ecf3 (patch) | |
| tree | 532b1ed2c6b83fa8af4c4c9fedcca4a25ad2e491 /src/backend/commands | |
| parent | e1483d4fb3e6ca8d2b97baf81863333c8d6b4189 (diff) | |
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.
Diffstat (limited to 'src/backend/commands')
| -rw-r--r-- | src/backend/commands/vacuum.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 1349de2f72..c9c9baad54 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -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); } |
