Content-Length: 263050 | pFad | http://github.com/postgrespro/postgres_cluster/commit/426b00dd7090015693203dfbee67ae71a16434a6

29 Allow starting recovery from specified donor (extracted from fa0ca216) · postgrespro/postgres_cluster@426b00d · GitHub
Skip to content

Commit 426b00d

Browse files
committed
Allow starting recovery from specified donor (extracted from fa0ca21)
1 parent 34c4dd5 commit 426b00d

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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/426b00dd7090015693203dfbee67ae71a16434a6

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy