Skip to content

Commit 296a57a

Browse files
committed
Do not change cluster status because of pglogical errors
1 parent dd6e4d6 commit 296a57a

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

contrib/mmts/arbiter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ static int MtmConnectSocket(char const* host, int port, int max_attempts)
401401

402402
/* Some node considered that I am dead, so switch to recovery mode */
403403
if (BIT_CHECK(resp.disabledNodeMask, MtmNodeId-1)) {
404-
elog(WARNING, "Node %d think that I am dead", resp.node);
404+
elog(WARNING, "Node %d thinks that I was dead", resp.node);
405405
BIT_SET(Mtm->disabledNodeMask, MtmNodeId-1);
406406
MtmSwitchClusterMode(MTM_RECOVERY);
407407
}

contrib/mmts/multimaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,7 +2146,7 @@ MtmOnProcExit(int code, Datum arg)
21462146
if (MtmReplicationNodeId > 0) {
21472147
Mtm->nodes[MtmReplicationNodeId-1].senderPid = -1;
21482148
MTM_LOG1("WAL-sender to %d is terminated", MtmReplicationNodeId);
2149-
MtmOnNodeDisconnect(MtmReplicationNodeId);
2149+
/* MtmOnNodeDisconnect(MtmReplicationNodeId); */
21502150
}
21512151
}
21522152

@@ -2242,7 +2242,7 @@ MtmReplicationShutdownHook(struct PGLogicalShutdownHookArgs* args)
22422242
{
22432243
if (MtmReplicationNodeId >= 0) {
22442244
MTM_LOG1("Logical replication to node %d is stopped", MtmReplicationNodeId);
2245-
MtmOnNodeDisconnect(MtmReplicationNodeId);
2245+
/* MtmOnNodeDisconnect(MtmReplicationNodeId); */
22462246
MtmReplicationNodeId = -1; /* defuse on_proc_exit hook */
22472247
}
22482248
}

contrib/mmts/pglogical_receiver.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ pglogical_receiver_main(Datum main_arg)
275275
PQclear(res);
276276
ereport(ERROR, (errmsg("%s: Could not create logical slot",
277277
worker_proc)));
278-
MtmOnNodeDisconnect(nodeId);
278+
/* MtmOnNodeDisconnect(nodeId); */
279279
proc_exit(1);
280280
}
281281
}
@@ -317,7 +317,7 @@ pglogical_receiver_main(Datum main_arg)
317317
PQclear(res);
318318
ereport(WARNING, (errmsg("%s: Could not start logical replication",
319319
worker_proc)));
320-
MtmOnNodeDisconnect(nodeId);
320+
/* MtmOnNodeDisconnect(nodeId); */
321321
proc_exit(1);
322322
}
323323
PQclear(res);
@@ -408,7 +408,7 @@ pglogical_receiver_main(Datum main_arg)
408408
{
409409
ereport(LOG, (errmsg("%s: streaming header too small: %d",
410410
worker_proc, rc)));
411-
MtmOnNodeDisconnect(nodeId);
411+
/* MtmOnNodeDisconnect(nodeId); */
412412
proc_exit(1);
413413
}
414414
replyRequested = copybuf[pos];
@@ -429,7 +429,7 @@ pglogical_receiver_main(Datum main_arg)
429429

430430
/* Leave is feedback is not sent properly */
431431
if (!sendFeedback(conn, now, nodeId)) {
432-
MtmOnNodeDisconnect(nodeId);
432+
/* MtmOnNodeDisconnect(nodeId); */
433433
proc_exit(1);
434434
}
435435
}
@@ -439,7 +439,7 @@ pglogical_receiver_main(Datum main_arg)
439439
{
440440
ereport(LOG, (errmsg("%s: Incorrect streaming header",
441441
worker_proc)));
442-
MtmOnNodeDisconnect(nodeId);
442+
/* MtmOnNodeDisconnect(nodeId); */
443443
proc_exit(1);
444444
}
445445

@@ -548,7 +548,7 @@ pglogical_receiver_main(Datum main_arg)
548548
{
549549
ereport(LOG, (errmsg("%s: Incorrect status received... Leaving.",
550550
worker_proc)));
551-
MtmOnNodeDisconnect(nodeId);
551+
/* MtmOnNodeDisconnect(nodeId); */
552552
proc_exit(1);
553553
}
554554

@@ -557,7 +557,7 @@ pglogical_receiver_main(Datum main_arg)
557557
{
558558
ereport(LOG, (errmsg("%s: Data remaining on the socket... Leaving.",
559559
worker_proc)));
560-
MtmOnNodeDisconnect(nodeId);
560+
/* MtmOnNodeDisconnect(nodeId); */
561561
proc_exit(1);
562562
}
563563
continue;
@@ -576,7 +576,7 @@ pglogical_receiver_main(Datum main_arg)
576576
{
577577
ereport(LOG, (errmsg("%s: Failure while receiving changes...",
578578
worker_proc)));
579-
MtmOnNodeDisconnect(nodeId);
579+
/* MtmOnNodeDisconnect(nodeId); */
580580
proc_exit(1);
581581
}
582582
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy