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

Commit426b00d

Browse files
committed
Allow starting recovery from specified donor (extracted fromfa0ca21)
1 parent34c4dd5 commit426b00d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎multimaster.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3343,8 +3343,10 @@ MtmReplicationMode MtmGetReplicationMode(int nodeId, sig_atomic_t volatile* shut
33433343

33443344
if (BIT_CHECK(Mtm->disabledNodeMask,MtmNodeId-1))
33453345
{
3346-
/* Ok, then start recovery by luckiest walreceiver */
3347-
if (Mtm->recoverySlot==0||Mtm->recoverySlot==nodeId)
3346+
/* Ok, then start recovery by luckiest walreceiver (if there is no donor node).
3347+
* If this node was populated using basebackup, then donorNodeId is not zero and we should choose this node for recovery */
3348+
if ((Mtm->recoverySlot==0||Mtm->recoverySlot==nodeId)
3349+
&& (Mtm->donorNodeId==MtmNodeId||Mtm->donorNodeId==nodeId))
33483350
{
33493351
/* Lock on us */
33503352
Mtm->recoverySlot=nodeId;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp