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

Commitf9a03d2

Browse files
committed
Do not update restartLSN for prepare transaction records
1 parent86746e5 commitf9a03d2

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
@@ -4099,7 +4099,6 @@ bool MtmFilterTransaction(char* record, int size)
40994099
switch (event)
41004100
{
41014101
casePGLOGICAL_PREPARE:
4102-
return false;
41034102
casePGLOGICAL_PRECOMMIT_PREPARED:
41044103
casePGLOGICAL_ABORT_PREPARED:
41054104
gid=pq_getmsgstring(&s);
@@ -4114,7 +4113,10 @@ bool MtmFilterTransaction(char* record, int size)
41144113
restart_lsn=origin_node==MtmReplicationNodeId ?end_lsn :origin_lsn;
41154114
if (Mtm->nodes[origin_node-1].restartLSN<restart_lsn) {
41164115
MTM_LOG2("[restartlsn] node %d: %llx -> %llx (MtmFilterTransaction)",MtmReplicationNodeId,Mtm->nodes[MtmReplicationNodeId-1].restartLSN,restart_lsn);
4117-
Mtm->nodes[origin_node-1].restartLSN=restart_lsn;
4116+
if (event!=PGLOGICAL_PREPARE) {
4117+
/* Transactions can be prepared in different order, so to avoid loosing transactions we should not update restartLsn for them */
4118+
Mtm->nodes[origin_node-1].restartLSN=restart_lsn;
4119+
}
41184120
}else {
41194121
duplicate= true;
41204122
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp