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

Commit7d66929

Browse files
committed
Do not update restartLSN for prepare transaction records
1 parent9acf024 commit7d66929

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎contrib/mmts/multimaster.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3727,7 +3727,6 @@ bool MtmFilterTransaction(char* record, int size)
37273727
switch (event)
37283728
{
37293729
casePGLOGICAL_PREPARE:
3730-
// return false;
37313730
casePGLOGICAL_PRECOMMIT_PREPARED:
37323731
casePGLOGICAL_ABORT_PREPARED:
37333732
gid=pq_getmsgstring(&s);
@@ -3742,7 +3741,10 @@ bool MtmFilterTransaction(char* record, int size)
37423741
restart_lsn=origin_node==MtmReplicationNodeId ?end_lsn :origin_lsn;
37433742
if (Mtm->nodes[origin_node-1].restartLSN<restart_lsn) {
37443743
MTM_LOG2("[restartlsn] node %d: %llx -> %llx (MtmFilterTransaction)",MtmReplicationNodeId,Mtm->nodes[MtmReplicationNodeId-1].restartLSN,restart_lsn);
3745-
Mtm->nodes[origin_node-1].restartLSN=restart_lsn;
3744+
if (event!=PGLOGICAL_PREPARE) {
3745+
/* Transactions can be prepared in different order, so to avoid loosing transactions we should not update restartLsn for them */
3746+
Mtm->nodes[origin_node-1].restartLSN=restart_lsn;
3747+
}
37463748
}else {
37473749
duplicate= true;
37483750
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp