@@ -1286,8 +1286,8 @@ getMaxLSNFromSnapshot()
1286
1286
//}
1287
1287
1288
1288
//cur = GetActiveSnapshot();
1289
- cur = GetLatestSnapshot ();
1290
- // cur = GetTransactionSnapshot();
1289
+ // cur = GetLatestSnapshot();
1290
+ cur = GetTransactionSnapshot ();
1291
1291
if (cur == NULL )
1292
1292
elog (ERROR , "no active snapshot set" );
1293
1293
@@ -1447,7 +1447,8 @@ RecordTransactionCommit(void)
1447
1447
//LWLockRelease(SyncRepLock);
1448
1448
1449
1449
XLogRecPtr remoteFlushLSN = ((volatile WalSndCtlData * ) WalSndCtl )-> lsn [Min (synchronous_commit , SYNC_REP_WAIT_APPLY )];
1450
- XLogRecPtr maxSnapshotLSN = getMaxLSNFromSnapshot ();
1450
+ //XLogRecPtr maxSnapshotLSN = getMaxLSNFromSnapshot();
1451
+ XLogRecPtr maxSnapshotLSN = TransactionIdGetCommitLSN ((MyProc -> xmin ) - 1 );
1451
1452
//elog(INFO, "maxlsn = (%d), remotelsn = (%d)", XLogMaxLSN, remoteFlushLSN);
1452
1453
1453
1454
//if((XLogMaxLSN > remoteFlushLSN) && (remoteFlushLSN != 0))
@@ -2387,6 +2388,7 @@ CommitTransaction(void)
2387
2388
* must be done _before_ releasing locks we hold and _after_
2388
2389
* RecordTransactionCommit.
2389
2390
*/
2391
+
2390
2392
ProcArrayEndTransaction (MyProc , latestXid );
2391
2393
2392
2394
TransactionId xid = GetTopTransactionIdIfAny ();
@@ -2396,6 +2398,7 @@ CommitTransaction(void)
2396
2398
if (wrote_xlog && markXidCommitted )
2397
2399
SyncRepWaitForLSN (XactLastCommitEnd , true);
2398
2400
2401
+
2399
2402
/*
2400
2403
* This is all post-commit cleanup. Note that if an error is raised here,
2401
2404
* it's too late to abort the transaction. This should be just
0 commit comments