Skip to content

Commit 29fcef9

Browse files
committed
Push responses to WAL sender
1 parent 6ec617b commit 29fcef9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

contrib/mmts/pglogical_receiver.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ pglogical_receiver_main(Datum main_arg)
453453
int64 now = feGetCurrentTimestamp();
454454

455455
/* Leave is feedback is not sent properly */
456+
MtmUpdateLsnMapping(nodeId, InvalidXLogRecPtr);
456457
if (!sendFeedback(conn, now, nodeId)) {
457458
goto OnError;
458459
}
@@ -558,14 +559,7 @@ pglogical_receiver_main(Datum main_arg)
558559
timeoutptr = &timeout;
559560

560561
r = select(PQsocket(conn) + 1, &input_mask, NULL, NULL, timeoutptr);
561-
if (r == 0)
562-
{
563-
int64 now = feGetCurrentTimestamp();
564-
MtmUpdateLsnMapping(nodeId, InvalidXLogRecPtr);
565-
sendFeedback(conn, now, nodeId);
566-
continue;
567-
}
568-
else if (r < 0 && errno == EINTR)
562+
if (r <= 0 && errno == EINTR)
569563
{
570564
/*
571565
* Got a timeout or signal. Continue the loop and either

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