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

Commit9bf3fb8

Browse files
knizhnikkelvich
authored andcommitted
refresh cluster state in MtmReplicationStartupHook
1 parent11ec4be commit9bf3fb8

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

‎multimaster.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2491,9 +2491,9 @@ MtmReplicationMode MtmGetReplicationMode(int nodeId, sig_atomic_t volatile* shut
24912491
MtmSleep(STATUS_POLL_DELAY);
24922492
}
24932493
if (recovery) {
2494-
MTM_LOG1("%d: Restart replicationfor node %d after end of recovery",MyProcPid,nodeId);
2494+
MTM_LOG1("%d: Restart replicationfrim node %d after end of recovery",MyProcPid,nodeId);
24952495
}else {
2496-
MTM_LOG1("%d: Continue replicationslot for node %d",MyProcPid,nodeId);
2496+
MTM_LOG1("%d: Continue replicationfrom node %d",MyProcPid,nodeId);
24972497
}
24982498
/* After recovery completion we need to drop all other slots to avoid receive of redundant data */
24992499
returnrecovery ?REPLMODE_RECOVERED :REPLMODE_NORMAL;
@@ -2595,7 +2595,10 @@ MtmReplicationStartupHook(struct PGLogicalStartupHookArgs* args)
25952595
MtmCheckQuorum();
25962596
}else {
25972597
MtmUnlock();
2598-
elog(ERROR,"Disabled node %d tries to reconnect without recovery",MtmReplicationNodeId);
2598+
MtmRefreshClusterStatus(true);
2599+
if (BIT_CHECK(Mtm->disabledNodeMask,MtmReplicationNodeId-1)) {
2600+
elog(ERROR,"Disabled node %d tries to reconnect without recovery",MtmReplicationNodeId);
2601+
}
25992602
}
26002603
}else {
26012604
MTM_LOG1("Node %d start logical replication to node %d in normal mode",MtmNodeId,MtmReplicationNodeId);

‎pglogical_receiver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ pglogical_receiver_main(Datum main_arg)
612612
{
613613
ereport(LOG, (errmsg("%s: COPY Stream has abruptly ended...",
614614
worker_proc)));
615-
break;
615+
gotoOnError;
616616
}
617617

618618
/* Failure when reading copy stream, leave */

‎t/001_basic_recovery.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
diag("polling node 2");
9090
for (my$poller = 0;$poller < 3;$poller++) {
9191
my$pollee = 2;
92-
ok($cluster->poll($poller,'postgres',$pollee,10, 1),"node$pollee is online according to node$poller");
92+
ok($cluster->poll($poller,'postgres',$pollee,1000, 1),"node$pollee is online according to node$poller");
9393
}
9494

9595
diag("getting cluster state");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp