Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e423aa2

Browse files
committed
disallow replication to out-of-clique nodes
1 parent 9bf1789 commit e423aa2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

multimaster.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3740,6 +3740,11 @@ MtmReplicationStartupHook(struct PGLogicalStartupHookArgs* args)
37403740
MTM_ELOG(ERROR, "Stopped node %d tries to connect", MtmReplicationNodeId);
37413741
}
37423742

3743+
if (!BIT_CHECK(Mtm->clique, MtmReplicationNodeId-1)) {
3744+
MtmUnlock();
3745+
MTM_ELOG(ERROR, "Out-of-clique node %d tries to connect", MtmReplicationNodeId);
3746+
}
3747+
37433748
if (MtmIsRecoverySession) {
37443749
MTM_LOG1("%d: Node %d start recovery of node %d at position %llx", MyProcPid, MtmNodeId, MtmReplicationNodeId, recoveryStartPos);
37453750
Assert(MyReplicationSlot != NULL);

0 commit comments

Comments
 (0)