@@ -87,7 +87,7 @@ static bool DtmGlobalXidAssigned;
87
87
static int DtmLocalXidReserve ;
88
88
static int DtmCurcid ;
89
89
static Snapshot DtmLastSnapshot ;
90
- static TransactionManager DtmTM = {DtmGetTransactionStatus ,DtmSetTransactionStatus ,DtmGetSnapshot ,DtmGetNewTransactionId ,DtmGetOldestXmin ,TransactionIdIsRunning ,DtmGetGlobalTransactionId };
90
+ static TransactionManager DtmTM = {DtmGetTransactionStatus ,DtmSetTransactionStatus ,DtmGetSnapshot ,DtmGetNewTransactionId ,DtmGetOldestXmin ,PgTransactionIdIsInProgress ,DtmGetGlobalTransactionId , PgXidInMVCCSnapshot };
91
91
92
92
93
93
#define XTM_TRACE (fmt , ...)
@@ -169,7 +169,7 @@ static void DtmMergeWithGlobalSnapshot(Snapshot dst)
169
169
* Check that global and local snapshots are consistent: transactions marked as completed in global snapohsot
170
170
* should be completed locally
171
171
*/
172
- dst = GetLocalSnapshotData (dst );
172
+ dst = PgGetSnapshotData (dst );
173
173
for (i = 0 ;i < dst -> xcnt ;i ++ ) {
174
174
if (TransactionIdIsInDoubt (dst -> xip [i ])) {
175
175
gotoGetLocalSnapshot ;
@@ -213,7 +213,7 @@ static void DtmMergeWithGlobalSnapshot(Snapshot dst)
213
213
*/
214
214
static TransactionId DtmGetOldestXmin (Relation rel ,bool ignoreVacuum )
215
215
{
216
- TransactionId localXmin = GetOldestLocalXmin (rel ,ignoreVacuum );
216
+ TransactionId localXmin = PgGetOldestXmin (rel ,ignoreVacuum );
217
217
TransactionId globalXmin = dtm -> minXid ;
218
218
XTM_INFO ("XTM: DtmGetOldestXmin localXmin=%d, globalXmin=%d\n" ,localXmin ,globalXmin );
219
219
@@ -526,7 +526,7 @@ static Snapshot DtmGetSnapshot(Snapshot snapshot)
526
526
* which PRECEDS actual transaction for which Xid is received.
527
527
* This transaction doesn't need to take in accountn global snapshot
528
528
*/
529
- return GetLocalSnapshotData (snapshot );
529
+ return PgGetSnapshotData (snapshot );
530
530
}
531
531
if (TransactionIdIsValid (DtmNextXid )&& snapshot != & CatalogSnapshotData ) {
532
532
if (!DtmHasGlobalSnapshot && (snapshot != DtmLastSnapshot || DtmCurcid != snapshot -> curcid )) {
@@ -543,7 +543,7 @@ static Snapshot DtmGetSnapshot(Snapshot snapshot)
543
543
}
544
544
}else {
545
545
/* For local transactions and catalog snapshots use default GetSnapshotData implementation */
546
- snapshot = GetLocalSnapshotData (snapshot );
546
+ snapshot = PgGetSnapshotData (snapshot );
547
547
}
548
548
DtmUpdateRecentXmin (snapshot );
549
549
CurrentTransactionSnapshot = snapshot ;
@@ -557,7 +557,7 @@ static XidStatus DtmGetTransactionStatus(TransactionId xid, XLogRecPtr *lsn)
557
557
*/
558
558
XidStatus status = xid >=ShmemVariableCache -> nextXid
559
559
?TRANSACTION_STATUS_IN_PROGRESS
560
- :CLOGTransactionIdGetStatus (xid ,lsn );
560
+ :PgTransactionIdGetStatus (xid ,lsn );
561
561
XTM_TRACE ("XTM: DtmGetTransactionStatus\n" );
562
562
return status ;
563
563
}
@@ -569,7 +569,7 @@ static void DtmSetTransactionStatus(TransactionId xid, int nsubxids, Transaction
569
569
if (!DtmGlobalXidAssigned && TransactionIdIsValid (DtmNextXid )) {
570
570
CurrentTransactionSnapshot = NULL ;
571
571
if (status == TRANSACTION_STATUS_ABORTED ) {
572
- CLOGTransactionIdSetTreeStatus (xid ,nsubxids ,subxids ,status ,lsn );
572
+ PgTransactionIdSetTreeStatus (xid ,nsubxids ,subxids ,status ,lsn );
573
573
DtmGlobalSetTransStatus (xid ,status , false);
574
574
XTM_INFO ("Abort transaction %d\n" ,xid );
575
575
return ;
@@ -592,7 +592,7 @@ static void DtmSetTransactionStatus(TransactionId xid, int nsubxids, Transaction
592
592
status = gs ;
593
593
}
594
594
}
595
- CLOGTransactionIdSetTreeStatus (xid ,nsubxids ,subxids ,status ,lsn );
595
+ PgTransactionIdSetTreeStatus (xid ,nsubxids ,subxids ,status ,lsn );
596
596
}
597
597
598
598
static uint32 dtm_xid_hash_fn (const void * key ,Size keysize )