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

Commit 81ccbc2

Browse files
knizhnikkelvich
authored andcommitted
Push responses to WAL sender
1 parent 6766596 commit 81ccbc2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pglogical_receiver.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,15 @@ pglogical_receiver_main(Datum main_arg)
569569
timeoutptr = &timeout;
570570

571571
r = select(PQsocket(conn) + 1, &input_mask, NULL, NULL, timeoutptr);
572-
if (r == 0 || (r < 0 && errno == EINTR))
572+
if (r == 0)
573+
{
574+
int64 now = feGetCurrentTimestamp();
575+
576+
/* Leave is feedback is not sent properly */
577+
MtmUpdateLsnMapping(nodeId, InvalidXLogRecPtr);
578+
sendFeedback(conn, now, nodeId);
579+
}
580+
else if (r < 0 && errno == EINTR)
573581
{
574582
/*
575583
* Got a timeout or signal. Continue the loop and either

0 commit comments

Comments
 (0)