Skip to content

Commit fce52d2

Browse files
committed
Always request global snalshot to correctly implement read-committed
1 parent 0cb3dee commit fce52d2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

contrib/multimaster/multimaster.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ static TransactionId DtmNextXid;
115115
static SnapshotData DtmSnapshot = { HeapTupleSatisfiesMVCC };
116116
static bool DtmHasGlobalSnapshot;
117117
static int DtmLocalXidReserve;
118-
static int DtmCurcid;
119118
static Snapshot DtmLastSnapshot;
120119
static TransactionManager DtmTM = {
121120
DtmGetTransactionStatus,
@@ -617,11 +616,9 @@ static Snapshot DtmGetSnapshot(Snapshot snapshot)
617616
{
618617
if (TransactionIdIsValid(DtmNextXid) && snapshot != &CatalogSnapshotData)
619618
{
620-
int cid = GetCurrentCommandId(false);
621-
if (!DtmHasGlobalSnapshot && (snapshot != DtmLastSnapshot || DtmCurcid != cid) {
619+
if (!DtmHasGlobalSnapshot) {
622620
DtmGlobalGetSnapshot(DtmNextXid, &DtmSnapshot, &dtm->minXid);
623621
}
624-
DtmCurcid = cid;
625622
DtmLastSnapshot = snapshot;
626623
DtmMergeWithGlobalSnapshot(snapshot);
627624
if (!IsolationUsesXactSnapshot())

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