Skip to content

Commit 1edaf5a

Browse files
committed
Fix GTM
1 parent 0582c5d commit 1edaf5a

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy