mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
Refactor GetOldestXmin() to use flags
Replace ignoreVacuum parameter with more flexible flags. Author: Eiji Seki Review: Haribabu Kommi
This commit is contained in:
@@ -1000,7 +1000,7 @@ acquire_sample_rows(Relation onerel, int elevel,
|
||||
totalblocks = RelationGetNumberOfBlocks(onerel);
|
||||
|
||||
/* Need a cutoff xmin for HeapTupleSatisfiesVacuum */
|
||||
OldestXmin = GetOldestXmin(onerel, true);
|
||||
OldestXmin = GetOldestXmin(onerel, PROCARRAY_FLAGS_VACUUM);
|
||||
|
||||
/* Prepare for sampling block numbers */
|
||||
BlockSampler_Init(&bs, totalblocks, targrows, random());
|
||||
|
@@ -527,7 +527,7 @@ vacuum_set_xid_limits(Relation rel,
|
||||
* always an independent transaction.
|
||||
*/
|
||||
*oldestXmin =
|
||||
TransactionIdLimitedForOldSnapshots(GetOldestXmin(rel, true), rel);
|
||||
TransactionIdLimitedForOldSnapshots(GetOldestXmin(rel, PROCARRAY_FLAGS_VACUUM), rel);
|
||||
|
||||
Assert(TransactionIdIsNormal(*oldestXmin));
|
||||
|
||||
@@ -939,7 +939,7 @@ vac_update_datfrozenxid(void)
|
||||
* committed pg_class entries for new tables; see AddNewRelationTuple().
|
||||
* So we cannot produce a wrong minimum by starting with this.
|
||||
*/
|
||||
newFrozenXid = GetOldestXmin(NULL, true);
|
||||
newFrozenXid = GetOldestXmin(NULL, PROCARRAY_FLAGS_VACUUM);
|
||||
|
||||
/*
|
||||
* Similarly, initialize the MultiXact "min" with the value that would be
|
||||
|
Reference in New Issue
Block a user