Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6beea7c

Browse files
committed
Revert "Detect too late snapshot"
This reverts commitaf5213a.
1 parentcd9d3a2 commit6beea7c

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

‎contrib/multimaster/multimaster.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,6 @@ static void DtmInitialize()
748748
dtm->initialized= false;
749749
BgwPoolInit(&dtm->pool,MMExecutor,MMDatabaseName,MMQueueSize);
750750
RegisterXactCallback(DtmXactCallback,NULL);
751-
RegisterSubXactCallback(DtmSubXactCallback,NULL);
752751
}
753752
LWLockRelease(AddinShmemInitLock);
754753

‎contrib/pg_dtm/pg_dtm.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ static SnapshotData DtmSnapshot = { HeapTupleSatisfiesMVCC };
107107
staticboolDtmHasGlobalSnapshot;
108108
staticboolDtmGlobalXidAssigned;
109109
staticintDtmLocalXidReserve;
110+
staticintDtmCurcid;
110111
staticSnapshotDtmLastSnapshot;
111112
staticTransactionManagerDtmTM= {
112113
DtmGetTransactionStatus,
@@ -613,9 +614,9 @@ static Snapshot DtmGetSnapshot(Snapshot snapshot)
613614
}
614615
if (TransactionIdIsValid(DtmNextXid)&&snapshot!=&CatalogSnapshotData)
615616
{
616-
if (!DtmHasGlobalSnapshot) {
617+
if (!DtmHasGlobalSnapshot&& (snapshot!=DtmLastSnapshot||DtmCurcid!=snapshot->curcid))
617618
DtmGlobalGetSnapshot(DtmNextXid,&DtmSnapshot,&dtm->minXid);
618-
}
619+
DtmCurcid=snapshot->curcid;
619620
DtmLastSnapshot=snapshot;
620621
DtmMergeWithGlobalSnapshot(snapshot);
621622
if (!IsolationUsesXactSnapshot())
@@ -725,7 +726,6 @@ static void DtmInitialize()
725726
dtm->nReservedXids=0;
726727
dtm->minXid=InvalidTransactionId;
727728
RegisterXactCallback(DtmXactCallback,NULL);
728-
RegisterSubXactCallback(DtmSubXactCallback,NULL);
729729
}
730730
LWLockRelease(AddinShmemInitLock);
731731

‎contrib/pg_tsdtm/pg_dtm.c‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static cid_t dtm_sync(cid_t global_cid)
177177
SpinLockAcquire(&local->lock);
178178
}
179179
#endif
180-
returnlocal_cid;
180+
returnglobal_cid;
181181
}
182182

183183
void
@@ -647,10 +647,7 @@ cid_t DtmLocalAccess(DtmCurrentTrans* x, GlobalTransactionId gtid, cid_t global_
647647
x->is_global= true;
648648
}
649649
SpinLockRelease(&local->lock);
650-
if (global_cid<local_cid-DtmVacuumDelay*USEC) {
651-
elog(ERROR,"Too old snapshot: requested %ld, current %ld",global_cid,local_cid);
652-
}
653-
returnglobal_cid;
650+
returnlocal_cid;
654651
}
655652

656653
voidDtmLocalBeginPrepare(GlobalTransactionIdgtid)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp