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

Commitcca50ae

Browse files
committed
Assign CSN for commits with INVALID_CSN during recovery. That can happen due to donor node reboot (and lost map)
1 parent05ec09b commitcca50ae

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎pglogical_apply.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ process_remote_commit(StringInfo in)
739739
Assert(!TransactionIdIsValid(MtmGetCurrentTransactionId()));
740740
csn=pq_getmsgint64(in);
741741
/*
742-
* Since our recovery method allows undershoot ofcsn, we can receive
742+
* Since our recovery method allows undershoot oflsn, we can receive
743743
* some already committed transactions. And in case of donor node reboot
744744
* xid<->csn mapping for them will be lost. However we must filter such
745745
* transactions in walreceiver before this code. --sk
@@ -750,7 +750,10 @@ process_remote_commit(StringInfo in)
750750
MtmResetTransaction();
751751
StartTransactionCommand();
752752
MtmBeginSession(origin_node);
753-
MtmSetCurrentTransactionCSN(csn);
753+
if (csn==INVALID_CSN&&Mtm->status==MTM_RECOVERY)
754+
MtmSetCurrentTransactionCSN(MtmAssignCSN());
755+
else
756+
MtmSetCurrentTransactionCSN(csn);
754757
MtmSetCurrentTransactionGID(gid);
755758
FinishPreparedTransaction(gid, true);
756759
MTM_LOG2("Distributed transaction %s is committed",gid);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp