We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent34c4dd5 commit426b00dCopy full SHA for 426b00d
multimaster.c
@@ -3343,8 +3343,10 @@ MtmReplicationMode MtmGetReplicationMode(int nodeId, sig_atomic_t volatile* shut
3343
3344
if (BIT_CHECK(Mtm->disabledNodeMask,MtmNodeId-1))
3345
{
3346
-/* Ok, then start recovery by luckiest walreceiver */
3347
-if (Mtm->recoverySlot==0||Mtm->recoverySlot==nodeId)
+/* Ok, then start recovery by luckiest walreceiver (if there is no donor node).
+ * 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))
3350
3351
/* Lock on us */
3352
Mtm->recoverySlot=nodeId;