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

Commit d565819

Browse files
committed
Push responses to WAL sender
1 parent 9983b5a commit d565819

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

contrib/mmts/pglogical_receiver.c

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

561561
r = select(PQsocket(conn) + 1, &input_mask, NULL, NULL, timeoutptr);
562-
if (r == 0 || (r < 0 && errno == EINTR))
562+
if (r == 0)
563+
{
564+
int64 now = feGetCurrentTimestamp();
565+
566+
/* Leave is feedback is not sent properly */
567+
MtmUpdateLsnMapping(nodeId, InvalidXLogRecPtr);
568+
sendFeedback(conn, now, nodeId);
569+
}
570+
else if (r < 0 && errno == EINTR)
563571
{
564572
/*
565573
* Got a timeout or signal. Continue the loop and either

0 commit comments

Comments
 (0)