Skip to content

Commit 7adf6f0

Browse files
committed
Play with snapshots...
1 parent a6dde28 commit 7adf6f0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

contrib/pg_xtm/pg_dtm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ extern SnapshotData CatalogSnapshotData;
6262

6363
static Snapshot DtmGetSnapshot(Snapshot snapshot)
6464
{
65-
if (DtmHasSnapshot/* && snapshot != &CatalogSnapshotData*/) {
65+
if (DtmHasSnapshot && snapshot->satisfies == HeapTupleSatisfiesMVCC) {
6666
return &DtmSnapshot;
6767
}
6868
return GetLocalSnapshotData(snapshot);

contrib/pg_xtm/tests/transfers.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ func total() int32 {
163163
// register global transaction in DTMD
164164
exec(conn1, "select dtm_global_transaction($1, $2)", nodes, xids)
165165

166+
exec(conn1, "select dtm_get_snapshot()")
167+
exec(conn2, "select dtm_get_snapshot()")
168+
166169
sum1 = execQuery(conn1, "select sum(v) from t")
167170
sum2 = execQuery(conn2, "select sum(v) from t")
168171

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