Skip to content

Commit 402ac5c

Browse files
committed
Merge branch 'xtm' of gitlab.postgrespro.ru:pgpro-dev/postgrespro into xtm
2 parents 3a2cdd5 + 1edaf5a commit 402ac5c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

contrib/pg_gtm/pg_dtm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ static Size dtm_memsize(void);
9090
static void dtm_xact_callback(XactEvent event, void *arg);
9191
static void dtm_ensure_connection(void);
9292

93+
static Snapshot DtmGetSnapshotData(Snapshot snapshot);
94+
9395
/*
9496
* ***************************************************************************
9597
*/
@@ -391,7 +393,7 @@ void DtmInitialize()
391393
HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_KEYCOPY);
392394

393395
RegisterTransactionVisibilityCallback(DtmVisibilityCheck);
394-
TM->GetSnapshotData = DtmGetSnapshotData;
396+
TM->GetSnapshot = DtmGetSnapshotData;
395397

396398
LWLockAcquire(AddinShmemInitLock, LW_EXCLUSIVE);
397399
local = (DtmNodeState*)ShmemInitStruct("dtm", sizeof(DtmNodeState), &found);

contrib/pg_xtm/pg_dtm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ static void DtmSetTransactionStatus(TransactionId xid, int nsubxids, Transaction
8282
CLOGTransactionIdSetTreeStatus(xid, nsubxids, subxids, TRANSACTION_STATUS_IN_PROGRESS, lsn);
8383
DtmHasSnapshot = false;
8484
DtmEnsureConnection();
85-
return DtmGlobalSetTransStatus(DtmConn, DtmNodeId, xid, status);
85+
if (DtmGlobalSetTransStatus(DtmConn, DtmNodeId, xid, status)) {
86+
elog(ERROR, "DTMD failed to set transaction status");
87+
}
8688
}
8789

8890

0 commit comments

Comments
 (0)