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

Commit 8b9f412

Browse files
knizhnikkelvich
authored andcommitted
Push responses to WAL sender
1 parent 2b327b6 commit 8b9f412

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pglogical_receiver.c

+2-8
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
}
@@ -568,14 +569,7 @@ pglogical_receiver_main(Datum main_arg)
568569
timeoutptr = &timeout;
569570

570571
r = select(PQsocket(conn) + 1, &input_mask, NULL, NULL, timeoutptr);
571-
if (r == 0)
572-
{
573-
int64 now = feGetCurrentTimestamp();
574-
MtmUpdateLsnMapping(nodeId, InvalidXLogRecPtr);
575-
sendFeedback(conn, now, nodeId);
576-
continue;
577-
}
578-
else if (r < 0 && errno == EINTR)
572+
if (r <= 0 && errno == EINTR)
579573
{
580574
/*
581575
* Got a timeout or signal. Continue the loop and either

0 commit comments

Comments
 (0)