Revert back to using GetOldestXmin csn2
authorHeikki Linnakangas <[email protected]>
Thu, 22 May 2014 21:58:00 +0000 (17:58 -0400)
committerHeikki Linnakangas <[email protected]>
Thu, 22 May 2014 21:58:00 +0000 (17:58 -0400)
13 files changed:
src/backend/access/heap/pruneheap.c
src/backend/access/transam/xlog.c
src/backend/catalog/index.c
src/backend/commands/analyze.c
src/backend/commands/cluster.c
src/backend/commands/vacuum.c
src/backend/commands/vacuumlazy.c
src/backend/storage/ipc/procarray.c
src/backend/storage/lmgr/predicate.c
src/backend/utils/time/tqual.c
src/include/access/heapam.h
src/include/commands/vacuum.h
src/include/utils/tqual.h

index f6e2599777093d4a3b564d0098a8d0c67f4bf3a1..8d87a60bd7de86c3370f07e4802b88ada08e1535 100644 (file)
@@ -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;
index 8f91a3f0220cbe21b6d8175923872ec0eaf9d268..6a3107d2178a8cdb0390457eb6f6650fb0e7bd04 100644 (file)
@@ -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);
index 1416f86a4c5c5232c768f28f5521c7469cbbf7a8..80acc0ec27f899e1efbf45bdd959df13bf0818dd 100644 (file)
@@ -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:
index fd18729068b6eb20d3ed121105248d1e39a13341..c09ca7e6db148ac429dad84118d0335f9b29f83c 100644 (file)
@@ -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:
index c5e1ff0c16a04e83dc577df063d22400df30f4f8..54a275318253c43171f82181c7aa18d3d55a08a6 100644 (file)
@@ -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 */
index bfc255016a106f1cc996317f857db83a27f08e64..9376450f62466c85a6c8e49c57cb2a257393c7d0 100644 (file)
@@ -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);
index e54c58e56451b449ac1aeaace5f8e024c8eaf9a6..8beb1248806cb7bdd14badfea2d38678ef7baca6 100644 (file)
@@ -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;
index e267a86388f4aa415b8f1827933ea65a2cda0f54..cbcad98161060c1b6b7db3a081ab41d8bef7ae5a 100644 (file)
@@ -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
index 0eba666ae6857e03565ea232a7c209dbca6d8d40..d8df7df225f019f2ca9abf8c5ebb18509e841e94 100644 (file)
@@ -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:
index 06d7b86ea1c31337fb443b10c0a6637f549c8efa..b3c88cf5cbd4091a04c97de7dce6cb9e830aa7c5 100644 (file)
@@ -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 */
index aebd0944c4c4f32bf8f6fc2341de5c84fc0c44d6..1ea151e6195b98343804592516a52dcbed51d736 100644 (file)
@@ -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,
index fb9ae8f70755e753cac553b9f5925dd97b48143b..cd90eae461941925dc58cc6a6d25ccbd758c3a15 100644 (file)
@@ -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,
index 35cff6741b232efbe3e463a302e46dea9e1d5d4a..ae285c3ed5f88173975db02497d15f26a431a3f3 100644 (file)
@@ -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);