diff options
| author | Alvaro Herrera | 2013-11-28 19:52:54 +0000 |
|---|---|---|
| committer | Alvaro Herrera | 2013-11-30 00:48:11 +0000 |
| commit | f5f92bdc44ffdf577244e0d055825cacd0cdea10 (patch) | |
| tree | e2314619870700916729b33348a33d94f394b22c /src/include | |
| parent | d9484ab5f3cbcfea64536fec333723f9aa4c0b2c (diff) | |
Fix full-table-vacuum request mechanism for MultiXactIds
While autovacuum dutifully launched anti-multixact-wraparound vacuums
when the multixact "age" was reached, the vacuum code was not aware that
it needed to make them be full table vacuums. As the resulting
partial-table vacuums aren't capable of actually increasing relminmxid,
autovacuum continued to launch anti-wraparound vacuums that didn't have
the intended effect, until age of relfrozenxid caused the vacuum to
finally be a full table one via vacuum_freeze_table_age.
To fix, introduce logic for multixacts similar to that for plain
TransactionIds, using the same GUCs.
Backpatch to 9.3, where permanent MultiXactIds were introduced.
Andres Freund, some cleanup by Álvaro
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/access/multixact.h | 2 | ||||
| -rw-r--r-- | src/include/commands/vacuum.h | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/include/access/multixact.h b/src/include/access/multixact.h index 8a9eddee387..e6db81a8270 100644 --- a/src/include/access/multixact.h +++ b/src/include/access/multixact.h @@ -87,6 +87,8 @@ extern void MultiXactIdSetOldestMember(void); extern int GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **xids, bool allow_old); extern bool MultiXactIdPrecedes(MultiXactId multi1, MultiXactId multi2); +extern bool MultiXactIdPrecedesOrEquals(MultiXactId multi1, + MultiXactId multi2); extern void AtEOXact_MultiXact(void); extern void AtPrepare_MultiXact(void); diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h index 08bec256ba8..44a3c3bd52e 100644 --- a/src/include/commands/vacuum.h +++ b/src/include/commands/vacuum.h @@ -159,8 +159,9 @@ extern void vacuum_set_xid_limits(int freeze_min_age, int freeze_table_age, bool sharedRel, TransactionId *oldestXmin, TransactionId *freezeLimit, - TransactionId *freezeTableLimit, - MultiXactId *multiXactCutoff); + TransactionId *xidFullScanLimit, + MultiXactId *multiXactCutoff, + MultiXactId *mxactFullScanLimit); extern void vac_update_datfrozenxid(void); extern void vacuum_delay_point(void); |
