mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user