summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas2014-05-22 21:58:00 +0000
committerHeikki Linnakangas2014-05-22 21:58:00 +0000
commite1b93cb920b1be96da78787e217e0fa000ee0113 (patch)
tree436e25725168f6c74368282759c279d4441f485a
parent31cbf7f570f5442e5d868c4201efe893a3a55201 (diff)
Revert back to using GetOldestXmincsn2
-rw-r--r--src/backend/access/heap/pruneheap.c26
-rw-r--r--src/backend/access/transam/xlog.c16
-rw-r--r--src/backend/catalog/index.c8
-rw-r--r--src/backend/commands/analyze.c8
-rw-r--r--src/backend/commands/cluster.c10
-rw-r--r--src/backend/commands/vacuum.c32
-rw-r--r--src/backend/commands/vacuumlazy.c20
-rw-r--r--src/backend/storage/ipc/procarray.c7
-rw-r--r--src/backend/storage/lmgr/predicate.c2
-rw-r--r--src/backend/utils/time/tqual.c8
-rw-r--r--src/include/access/heapam.h2
-rw-r--r--src/include/commands/vacuum.h2
-rw-r--r--src/include/utils/tqual.h4
13 files changed, 78 insertions, 67 deletions
diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c
index f6e2599777..8d87a60bd7 100644
--- a/src/backend/access/heap/pruneheap.c
+++ b/src/backend/access/heap/pruneheap.c
@@ -47,7 +47,7 @@ typedef struct
/* Local functions */
static int heap_prune_chain(Relation relation, Buffer buffer,
OffsetNumber rootoffnum,
- XLogRecPtr OldestSnapshot,
+ TransactionId OldestXmin,
PruneState *prstate);
static void heap_prune_record_prunable(PruneState *prstate, TransactionId xid);
static void heap_prune_record_redirect(PruneState *prstate,
@@ -76,6 +76,7 @@ heap_page_prune_opt(Relation relation, Buffer buffer)
{
Page page = BufferGetPage(buffer);
Size minfree;
+ TransactionId OldestXmin;
/*
* We can't write WAL in recovery mode, so there's no point trying to
@@ -92,14 +93,17 @@ heap_page_prune_opt(Relation relation, Buffer buffer)
* horizon can be used. Note that the toast relation of user defined
* relations are *not* considered catalog relations.
*/
-#ifdef BROKEN
+ AdvanceRecentGlobalXmin();
+#ifdef FIXME
if (IsCatalogRelation(relation) ||
RelationIsAccessibleInLogicalDecoding(relation))
OldestXmin = RecentGlobalXmin;
else
OldestXmin = RecentGlobalDataXmin;
#endif
- if (!TransactionIdIsValid(RecentGlobalXmin))
+ OldestXmin = RecentGlobalXmin;
+
+ if (!TransactionIdIsValid(OldestXmin))
return;
/*
@@ -108,7 +112,7 @@ heap_page_prune_opt(Relation relation, Buffer buffer)
* Forget it if page is not hinted to contain something prunable that's
* older than OldestXmin.
*/
- if (!PageIsPrunable(page, RecentGlobalXmin))
+ if (!PageIsPrunable(page, OldestXmin))
return;
/*
@@ -145,9 +149,7 @@ heap_page_prune_opt(Relation relation, Buffer buffer)
* needed */
/* OK to prune */
- (void) heap_page_prune(relation, buffer,
- GetOldestSnapshotLSN(NULL, false),
- true, &ignore);
+ (void) heap_page_prune(relation, buffer, OldestXmin, true, &ignore);
}
/* And release buffer lock */
@@ -173,7 +175,7 @@ heap_page_prune_opt(Relation relation, Buffer buffer)
* latestRemovedXid.
*/
int
-heap_page_prune(Relation relation, Buffer buffer, XLogRecPtr OldestSnapshot,
+heap_page_prune(Relation relation, Buffer buffer, TransactionId OldestXmin,
bool report_stats, XLogRecPtr *latestRemovedCommitLSN)
{
int ndeleted = 0;
@@ -217,7 +219,7 @@ heap_page_prune(Relation relation, Buffer buffer, XLogRecPtr OldestSnapshot,
/* Process this item or chain of items */
ndeleted += heap_prune_chain(relation, buffer, offnum,
- OldestSnapshot,
+ OldestXmin,
&prstate);
}
@@ -346,7 +348,7 @@ heap_page_prune(Relation relation, Buffer buffer, XLogRecPtr OldestSnapshot,
*/
static int
heap_prune_chain(Relation relation, Buffer buffer, OffsetNumber rootoffnum,
- XLogRecPtr OldestSnapshot,
+ TransactionId OldestXmin,
PruneState *prstate)
{
int ndeleted = 0;
@@ -398,7 +400,7 @@ heap_prune_chain(Relation relation, Buffer buffer, OffsetNumber rootoffnum,
* either here or while following a chain below. Whichever path
* gets there first will mark the tuple unused.
*/
- if (HeapTupleSatisfiesVacuumX(&tup, OldestSnapshot, buffer)
+ if (HeapTupleSatisfiesVacuum(&tup, OldestXmin, buffer)
== HEAPTUPLE_DEAD && !HeapTupleHeaderIsHotUpdated(htup))
{
heap_prune_record_unused(prstate, rootoffnum);
@@ -482,7 +484,7 @@ heap_prune_chain(Relation relation, Buffer buffer, OffsetNumber rootoffnum,
*/
tupdead = recent_dead = false;
- switch (HeapTupleSatisfiesVacuumX(&tup, OldestSnapshot, buffer))
+ switch (HeapTupleSatisfiesVacuum(&tup, OldestXmin, buffer))
{
case HEAPTUPLE_DEAD:
tupdead = true;
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 8f91a3f022..6a3107d217 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -8276,12 +8276,20 @@ CreateCheckPoint(int flags)
* attempt to reference any pg_subtrans entry older than that (see Asserts
* in subtrans.c). During recovery, though, we mustn't do this because
* StartupSUBTRANS hasn't been called yet.
+ *
+ * FIXME: this is broken, because the xmin's in snapshots are now
+ * just conservative estimates, and can lag behind the value calculated by
+ * GetOldestXmin(). IOW, GetOldestXmin() can return a value smaller than
+ * the xmin of a snapshot. All the transactions between GetOldestXmin's
+ * return values and the xmin of any snapshots are in fact considered
+ * visible to all snapshots, which is why the return value of
+ * GetOldestXmin() is OK for deciding e.g whether a tuple can be frozen,
+ * but when checking visibility with that snapshot, you might need to
+ * access subtrans and clog to reach that conclusion, so it's not cool
+ * to truncate away that piece of subtrans or clog.
*/
if (!RecoveryInProgress())
- {
- AdvanceRecentGlobalXmin();
- TruncateSUBTRANS(RecentGlobalXmin);
- }
+ TruncateSUBTRANS(GetOldestXmin(NULL, false));
/* Real work is done, but log and update stats before releasing lock. */
LogCheckpointEnd(false);
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 1416f86a4c..80acc0ec27 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -2108,7 +2108,7 @@ IndexBuildHeapScan(Relation heapRelation,
EState *estate;
ExprContext *econtext;
Snapshot snapshot;
- XLogRecPtr OldestSnapshot;
+ TransactionId OldestXmin;
BlockNumber root_blkno = InvalidBlockNumber;
OffsetNumber root_offsets[MaxHeapTuplesPerPage];
@@ -2150,13 +2150,13 @@ IndexBuildHeapScan(Relation heapRelation,
if (IsBootstrapProcessingMode() || indexInfo->ii_Concurrent)
{
snapshot = RegisterSnapshot(GetTransactionSnapshot());
- OldestSnapshot = InvalidXLogRecPtr; /* not used */
+ OldestXmin = InvalidTransactionId; /* not used */
}
else
{
snapshot = SnapshotAny;
/* okay to ignore lazy VACUUMs here */
- OldestSnapshot = GetOldestSnapshotLSN(heapRelation, true);
+ OldestXmin = GetOldestXmin(heapRelation, true);
}
scan = heap_beginscan_strat(heapRelation, /* relation */
@@ -2229,7 +2229,7 @@ IndexBuildHeapScan(Relation heapRelation,
*/
LockBuffer(scan->rs_cbuf, BUFFER_LOCK_SHARE);
- switch (HeapTupleSatisfiesVacuumX(heapTuple, OldestSnapshot,
+ switch (HeapTupleSatisfiesVacuum(heapTuple, OldestXmin,
scan->rs_cbuf))
{
case HEAPTUPLE_DEAD:
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index fd18729068..c09ca7e6db 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -1073,7 +1073,7 @@ acquire_sample_rows(Relation onerel, int elevel,
double deadrows = 0; /* # dead rows seen */
double rowstoskip = -1; /* -1 means not set yet */
BlockNumber totalblocks;
- XLogRecPtr OldestSnapshot;
+ TransactionId OldestXmin;
BlockSamplerData bs;
double rstate;
@@ -1082,7 +1082,7 @@ acquire_sample_rows(Relation onerel, int elevel,
totalblocks = RelationGetNumberOfBlocks(onerel);
/* Need a cutoff xmin for HeapTupleSatisfiesVacuum */
- OldestSnapshot = GetOldestSnapshotLSN(onerel, true);
+ OldestXmin = GetOldestXmin(onerel, true);
/* Prepare for sampling block numbers */
BlockSampler_Init(&bs, totalblocks, targrows);
@@ -1143,8 +1143,8 @@ acquire_sample_rows(Relation onerel, int elevel,
targtuple.t_data = (HeapTupleHeader) PageGetItem(targpage, itemid);
targtuple.t_len = ItemIdGetLength(itemid);
- switch (HeapTupleSatisfiesVacuumX(&targtuple,
- OldestSnapshot,
+ switch (HeapTupleSatisfiesVacuum(&targtuple,
+ OldestXmin,
targbuffer))
{
case HEAPTUPLE_LIVE:
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index c5e1ff0c16..54a2753182 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -749,7 +749,7 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex, bool verbose,
HeapScanDesc heapScan;
bool use_wal;
bool is_system_catalog;
- XLogRecPtr OldestSnapshot;
+ TransactionId OldestXmin;
TransactionId FreezeXid;
MultiXactId MultiXactCutoff;
RewriteState rwstate;
@@ -791,7 +791,7 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex, bool verbose,
* it from being vacuumed. This is needed because autovacuum processes
* toast tables independently of their main tables, with no lock on the
* latter. If an autovacuum were to start on the toast table after we
- * compute our OldestSnapshot below, it would use a later OldestSnapshot, and then
+ * compute our OldestXmin below, it would use a later OldestXmin, and then
* possibly remove as DEAD toast tuples belonging to main tuples we think
* are only RECENTLY_DEAD. Then we'd fail while trying to copy those
* tuples.
@@ -851,7 +851,7 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex, bool verbose,
* not to be aggressive about this.
*/
vacuum_set_xid_limits(OldHeap, 0, 0, 0, 0,
- &OldestSnapshot, &FreezeXid, NULL, &MultiXactCutoff,
+ &OldestXmin, &FreezeXid, NULL, &MultiXactCutoff,
NULL);
/*
@@ -869,7 +869,7 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex, bool verbose,
is_system_catalog = IsSystemRelation(OldHeap);
/* Initialize the rewrite operation */
- rwstate = begin_heap_rewrite(OldHeap, NewHeap, OldestSnapshot, FreezeXid,
+ rwstate = begin_heap_rewrite(OldHeap, NewHeap, OldestXmin, FreezeXid,
MultiXactCutoff, use_wal);
/*
@@ -963,7 +963,7 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex, bool verbose,
LockBuffer(buf, BUFFER_LOCK_SHARE);
- switch (HeapTupleSatisfiesVacuumX(tuple, OldestSnapshot, buf))
+ switch (HeapTupleSatisfiesVacuum(tuple, OldestXmin, buf))
{
case HEAPTUPLE_DEAD:
/* Definitely dead */
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index bfc255016a..9376450f62 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -403,7 +403,7 @@ vacuum_set_xid_limits(Relation rel,
int freeze_table_age,
int multixact_freeze_min_age,
int multixact_freeze_table_age,
- XLogRecPtr *oldestSnapshot,
+ TransactionId *oldestXmin,
TransactionId *freezeLimit,
TransactionId *xidFullScanLimit,
MultiXactId *multiXactCutoff,
@@ -415,7 +415,6 @@ vacuum_set_xid_limits(Relation rel,
TransactionId safeLimit;
MultiXactId mxactLimit;
MultiXactId safeMxactLimit;
- TransactionId oldestXmin;
/*
* We can always ignore processes running lazy vacuum. This is because we
@@ -426,16 +425,9 @@ vacuum_set_xid_limits(Relation rel,
* working on a particular table at any time, and that each vacuum is
* always an independent transaction.
*/
- *oldestSnapshot = GetOldestSnapshotLSN(rel, true);
+ *oldestXmin = GetOldestXmin(rel, true);
- /*
- * Note that we no longer use the oldestXmin value for deciding which
- * tuples can be removed. That's oldestSnapshot's charter now. oldestXmin
- * is only used to calculate the freeze limit.
- */
- oldestXmin = GetOldestXmin(rel, true);
-
- Assert(TransactionIdIsNormal(oldestXmin));
+ Assert(TransactionIdIsNormal(*oldestXmin));
/*
* Determine the minimum freeze age to use: as specified by the caller, or
@@ -452,7 +444,7 @@ vacuum_set_xid_limits(Relation rel,
/*
* Compute the cutoff XID, being careful not to generate a "permanent" XID
*/
- limit = oldestXmin - freezemin;
+ limit = *oldestXmin - freezemin;
if (!TransactionIdIsNormal(limit))
limit = FirstNormalTransactionId;
@@ -978,6 +970,22 @@ vac_truncate_clog(TransactionId frozenXID, MultiXactId minMulti)
return;
}
+ /*
+ * FIXME: this is broken, because the xmin's in snapshots are now
+ * just conservative estimates, and can lag behind the value calculated by
+ * GetOldestXmin(). IOW, GetOldestXmin() can return a value smaller than
+ * the xmin of a snapshot. All the transactions between GetOldestXmin's
+ * return values and the xmin of any snapshots are in fact considered
+ * visible to all snapshots, which is why the return value of
+ * GetOldestXmin() is OK for deciding e.g whether a tuple can be frozen,
+ * but when checking visibility with that snapshot, you might need to
+ * access subtrans and clog to reach that conclusion, so it's not cool
+ * to truncate away that piece of subtrans or clog.
+ *
+ * For truncating the clog, what we'd need is the MIN(xmin) among all
+ * the snapshots still active in the system.
+ */
+
/* Truncate CLOG and Multi to the oldest computed value */
TruncateCLOG(frozenXID);
TruncateMultiXact(minMulti);
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index e54c58e564..8beb124880 100644
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -126,7 +126,7 @@ typedef struct LVRelStats
/* A few variables that don't seem worth passing around as parameters */
static int elevel = -1;
-static XLogRecPtr OldestSnapshot;
+static TransactionId OldestXmin;
static TransactionId FreezeLimit;
static MultiXactId MultiXactCutoff;
@@ -210,7 +210,7 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt,
vacstmt->freeze_min_age, vacstmt->freeze_table_age,
vacstmt->multixact_freeze_min_age,
vacstmt->multixact_freeze_table_age,
- &OldestSnapshot, &FreezeLimit, &xidFullScanLimit,
+ &OldestXmin, &FreezeLimit, &xidFullScanLimit,
&MultiXactCutoff, &mxactFullScanLimit);
/*
@@ -520,7 +520,6 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
bool all_visible;
bool has_dead_tuples;
TransactionId visibility_cutoff_xid = InvalidTransactionId;
- XLogRecPtr commitlsn;
if (blkno == next_not_all_visible_block)
{
@@ -734,7 +733,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
*
* We count tuples removed by the pruning step as removed by VACUUM.
*/
- tups_vacuumed += heap_page_prune(onerel, buf, OldestSnapshot, false,
+ tups_vacuumed += heap_page_prune(onerel, buf, OldestXmin, false,
&vacrelstats->latestRemovedCommitLSN);
/*
@@ -797,7 +796,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
tupgone = false;
- switch (HeapTupleSatisfiesVacuumX(&tuple, OldestSnapshot, buf))
+ switch (HeapTupleSatisfiesVacuum(&tuple, OldestXmin, buf))
{
case HEAPTUPLE_DEAD:
@@ -854,9 +853,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
* enough that everyone sees it as committed?
*/
xmin = HeapTupleHeaderGetXmin(tuple.t_data);
- commitlsn = TransactionIdGetCommitLSN(xmin);
- Assert(COMMITLSN_IS_COMMITTED(commitlsn));
- if (commitlsn > OldestSnapshot)
+ if (xmin > OldestXmin)
{
all_visible = false;
break;
@@ -1750,7 +1747,6 @@ heap_page_is_all_visible(Relation rel, Buffer buf, TransactionId *visibility_cut
OffsetNumber offnum,
maxoff;
bool all_visible = true;
- XLogRecPtr commitlsn;
*visibility_cutoff_xid = InvalidTransactionId;
@@ -1790,7 +1786,7 @@ heap_page_is_all_visible(Relation rel, Buffer buf, TransactionId *visibility_cut
tuple.t_len = ItemIdGetLength(itemid);
tuple.t_tableOid = RelationGetRelid(rel);
- switch (HeapTupleSatisfiesVacuumX(&tuple, OldestSnapshot, buf))
+ switch (HeapTupleSatisfiesVacuum(&tuple, OldestXmin, buf))
{
case HEAPTUPLE_LIVE:
{
@@ -1808,9 +1804,7 @@ heap_page_is_all_visible(Relation rel, Buffer buf, TransactionId *visibility_cut
* that everyone sees it as committed?
*/
xmin = HeapTupleHeaderGetXmin(tuple.t_data);
- commitlsn = TransactionIdGetCommitLSN(xmin);
- Assert(COMMITLSN_IS_COMMITTED(commitlsn));
- if (commitlsn > OldestSnapshot)
+ if (xmin > OldestXmin)
{
all_visible = false;
break;
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index e267a86388..cbcad98161 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -677,10 +677,11 @@ GetOldestXmin(Relation rel, bool ignoreVacuum)
/*
* Get the LSN of the oldest snapshot still active.
*
- * With LSN-based snapshots, this is more accurate than GetOldestXmin().
+ * With LSN-based snapshots, this is more accurate than GetOldestXmin()
+ * (i.e. this allows you to remove more dead tuples).
*
- * FIXME: the replication_slot_xmin and replication_slot_catalog_xmin values
- * don't affect this, so when this is used to decide if a dead tuple can be
+ * XXX: the replication_slot_xmin and replication_slot_catalog_xmin values
+ * don't affect this, so if this is used to decide if a dead tuple can be
* vacuumed, it breaks logical decoding.
*/
XLogRecPtr
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 0eba666ae6..d8df7df225 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -3896,7 +3896,7 @@ CheckForSerializableConflictOut(bool visible, Relation relation,
* tuple is visible to us, while HeapTupleSatisfiesVacuum checks what else
* is going on with it.
*/
- htsvResult = HeapTupleSatisfiesVacuumX(tuple, TransactionSnapshotLSN, buffer);
+ htsvResult = HeapTupleSatisfiesVacuum(tuple, TransactionXmin, buffer);
switch (htsvResult)
{
case HEAPTUPLE_LIVE:
diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c
index 06d7b86ea1..b3c88cf5cb 100644
--- a/src/backend/utils/time/tqual.c
+++ b/src/backend/utils/time/tqual.c
@@ -1019,7 +1019,7 @@ HeapTupleSatisfiesMVCC(HeapTuple htup, Snapshot snapshot,
* FIXME: renamed to make sure we don't miss modifying any callers.
*/
HTSV_Result
-HeapTupleSatisfiesVacuumX(HeapTuple htup, XLogRecPtr OldestSnapshot,
+HeapTupleSatisfiesVacuum(HeapTuple htup, TransactionId OldestXmin,
Buffer buffer)
{
HeapTupleHeader tuple = htup->t_data;
@@ -1176,7 +1176,7 @@ HeapTupleSatisfiesVacuumX(HeapTuple htup, XLogRecPtr OldestSnapshot,
commitlsn = TransactionIdGetCommitLSN(xmax);
if (COMMITLSN_IS_COMMITTED(commitlsn))
{
- if (commitlsn > OldestSnapshot)
+ if (!TransactionIdPrecedes(xmax, OldestXmin))
return HEAPTUPLE_RECENTLY_DEAD;
else
return HEAPTUPLE_DEAD;
@@ -1220,9 +1220,7 @@ HeapTupleSatisfiesVacuumX(HeapTuple htup, XLogRecPtr OldestSnapshot,
* Deleter committed, but perhaps it was recent enough that some open
* transactions could still see the tuple.
*/
- commitlsn = TransactionIdGetCommitLSN(HeapTupleHeaderGetRawXmax(tuple));
- Assert(COMMITLSN_IS_COMMITTED(commitlsn));
- if (commitlsn > OldestSnapshot)
+ if (!TransactionIdPrecedes(HeapTupleHeaderGetRawXmax(tuple), OldestXmin))
return HEAPTUPLE_RECENTLY_DEAD;
/* Otherwise, it's dead and removable */
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index aebd0944c4..1ea151e619 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -166,7 +166,7 @@ extern void heap_sync(Relation relation);
/* in heap/pruneheap.c */
extern void heap_page_prune_opt(Relation relation, Buffer buffer);
extern int heap_page_prune(Relation relation, Buffer buffer,
- XLogRecPtr OldestSnapshot,
+ TransactionId OldestXmin,
bool report_stats, XLogRecPtr *latestRemovedCommitLSN);
extern void heap_page_prune_execute(Buffer buffer,
OffsetNumber *redirected, int nredirected,
diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h
index fb9ae8f707..cd90eae461 100644
--- a/src/include/commands/vacuum.h
+++ b/src/include/commands/vacuum.h
@@ -162,7 +162,7 @@ extern void vacuum_set_xid_limits(Relation rel,
int freeze_min_age, int freeze_table_age,
int multixact_freeze_min_age,
int multixact_freeze_table_age,
- XLogRecPtr *oldestSnapshot,
+ TransactionId *oldestXmin,
TransactionId *freezeLimit,
TransactionId *xidFullScanLimit,
MultiXactId *multiXactCutoff,
diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h
index 35cff6741b..ae285c3ed5 100644
--- a/src/include/utils/tqual.h
+++ b/src/include/utils/tqual.h
@@ -81,8 +81,8 @@ extern bool HeapTupleSatisfiesHistoricMVCC(HeapTuple htup,
/* Special "satisfies" routines with different APIs */
extern HTSU_Result HeapTupleSatisfiesUpdate(HeapTuple htup,
CommandId curcid, Buffer buffer);
-extern HTSV_Result HeapTupleSatisfiesVacuumX(HeapTuple htup,
- XLogRecPtr OldestSnapshot, Buffer buffer);
+extern HTSV_Result HeapTupleSatisfiesVacuum(HeapTuple htup,
+ TransactionId OldestXmin, Buffer buffer);
extern bool HeapTupleIsSurelyDead(HeapTuple htup,
TransactionId OldestXmin);