Skip to content

Commit 03737b4

Browse files
committed
Test on buildfarm: try to reconnect receiver on slot error
1 parent d65bd10 commit 03737b4

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

pglogical_receiver.c

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -366,20 +366,21 @@ pglogical_receiver_main(Datum main_arg)
366366
res = PQexec(conn, query->data);
367367
if (PQresultStatus(res) != PGRES_COPY_BOTH)
368368
{
369-
int i, n_deleted_slots = 0;
369+
// int i, n_deleted_slots = 0;
370370

371-
elog(WARNING, "Can't find slot on node%d. Shutting down receiver.", nodeId);
372-
Mtm->nodes[nodeId-1].slotDeleted = true;
373-
for (i = 0; i < Mtm->nAllNodes; i++)
374-
{
375-
if (Mtm->nodes[i].slotDeleted)
376-
n_deleted_slots++;
377-
}
378-
if (n_deleted_slots == Mtm->nAllNodes - 1)
379-
{
380-
elog(FATAL, "All neighbour nopes have no replication slot for us. Exiting.");
381-
}
382-
proc_exit(1);
371+
elog(WARNING, "Can't find slot on node%d. Shutting down receiver. %s", nodeId, PQresultErrorMessage(res));
372+
goto OnError;
373+
// Mtm->nodes[nodeId-1].slotDeleted = true;
374+
// for (i = 0; i < Mtm->nAllNodes; i++)
375+
// {
376+
// if (Mtm->nodes[i].slotDeleted)
377+
// n_deleted_slots++;
378+
// }
379+
// if (n_deleted_slots == Mtm->nAllNodes - 1)
380+
// {
381+
// elog(FATAL, "All neighbour nopes have no replication slot for us. Exiting.");
382+
// }
383+
// proc_exit(1);
383384
}
384385
PQclear(res);
385386
resetPQExpBuffer(query);

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