diff --git a/src/backend/cdb/cdbdistributedsnapshot.c b/src/backend/cdb/cdbdistributedsnapshot.c index 135832c56f8adb40467ae7acff5c313210f1b4f6..b78a15da71b4dd9eb59bbc3479e16d2cc05ad55c 100644 --- a/src/backend/cdb/cdbdistributedsnapshot.c +++ b/src/backend/cdb/cdbdistributedsnapshot.c @@ -27,8 +27,7 @@ DistributedSnapshotCommitted DistributedSnapshotWithLocalMapping_CommittedTest( DistributedSnapshotWithLocalMapping *dslm, - TransactionId localXid, - bool isXmax) + TransactionId localXid) { DistributedSnapshotHeader *header = &dslm->header; DistributedSnapshotMapEntry *inProgressEntryArray = dslm->inProgressEntryArray; diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c index 6b9e835fe901e00d365a48b3d43a15b61668e630..39d79bd98a2de58e8ce3de40e4fba53d82013b2b 100644 --- a/src/backend/utils/time/tqual.c +++ b/src/backend/utils/time/tqual.c @@ -117,9 +117,9 @@ TransactionId RecentGlobalXmin = InvalidTransactionId; /* local functions */ -static bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot, bool isXmax, +static bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot, bool distributedSnapshotIgnore, bool *setDistributedSnapshotIgnore); -static bool XidInMVCCSnapshot_Local(TransactionId xid, Snapshot snapshot, bool isXmax); +static bool XidInMVCCSnapshot_Local(TransactionId xid, Snapshot snapshot); /* * Set the buffer dirty after setting t_infomask @@ -1112,7 +1112,6 @@ HeapTupleSatisfiesMVCC(Relation relation, HeapTupleHeader tuple, Snapshot snapsh */ inSnapshot = XidInMVCCSnapshot(HeapTupleHeaderGetXmin(tuple), snapshot, - /* isXmax */ false, ((tuple->t_infomask2 & HEAP_XMIN_DISTRIBUTED_SNAPSHOT_IGNORE) != 0), &setDistributedSnapshotIgnore); if (setDistributedSnapshotIgnore) @@ -1168,7 +1167,6 @@ HeapTupleSatisfiesMVCC(Relation relation, HeapTupleHeader tuple, Snapshot snapsh */ inSnapshot = XidInMVCCSnapshot(HeapTupleHeaderGetXmax(tuple), snapshot, - /* isXmax */ true, ((tuple->t_infomask2 & HEAP_XMAX_DISTRIBUTED_SNAPSHOT_IGNORE) != 0), &setDistributedSnapshotIgnore); if (setDistributedSnapshotIgnore) @@ -1531,7 +1529,7 @@ FreeXactSnapshot(void) * and local snapshots? */ static bool -XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot, bool isXmax, +XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot, bool distributedSnapshotIgnore, bool *setDistributedSnapshotIgnore) { Assert (setDistributedSnapshotIgnore != NULL); @@ -1555,8 +1553,7 @@ XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot, bool isXmax, distributedSnapshotCommitted = DistributedSnapshotWithLocalMapping_CommittedTest( &snapshot->distribSnapshotWithLocalMapping, - xid, - isXmax); + xid); switch (distributedSnapshotCommitted) { @@ -1581,7 +1578,7 @@ XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot, bool isXmax, } } - return XidInMVCCSnapshot_Local(xid, snapshot, isXmax); + return XidInMVCCSnapshot_Local(xid, snapshot); } /* @@ -1594,7 +1591,7 @@ XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot, bool isXmax, * apply this for known-committed XIDs. */ static bool -XidInMVCCSnapshot_Local(TransactionId xid, Snapshot snapshot, bool isXmax) +XidInMVCCSnapshot_Local(TransactionId xid, Snapshot snapshot) { uint32 i; diff --git a/src/include/cdb/cdbdistributedsnapshot.h b/src/include/cdb/cdbdistributedsnapshot.h index b5574022a935a595586303c4edd1c7af187c9678..b2008a1d128046482fa42e4f6b6c1b44271f7d92 100644 --- a/src/include/cdb/cdbdistributedsnapshot.h +++ b/src/include/cdb/cdbdistributedsnapshot.h @@ -115,8 +115,7 @@ typedef enum extern DistributedSnapshotCommitted DistributedSnapshotWithLocalMapping_CommittedTest( DistributedSnapshotWithLocalMapping *dslm, - TransactionId localXid, - bool isXmax); + TransactionId localXid); extern void DistributedSnapshot_Reset( DistributedSnapshot *distributedSnapshot);