Skip to content

Commit e6d3936

Browse files
knizhnikkelvich
authored andcommitted
Push responses to WAL sender
1 parent dc3e86c commit e6d3936

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pglogical_receiver.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ feTimestampDifference(int64 start_time, int64 stop_time,
193193

194194
static char const* const MtmReplicationModeName[] =
195195
{
196-
"exit",
196+
"exit",
197197
"recovered", /* recovery of node is completed so drop old slot and restart replication from the current position in WAL */
198198
"recovery", /* perform recorvery of the node by applying all data from theslot from specified point */
199199
"normal" /* normal mode: use existed slot or create new one and start receiving data from it from the specified position */
@@ -568,7 +568,13 @@ pglogical_receiver_main(Datum main_arg)
568568
timeoutptr = &timeout;
569569

570570
r = select(PQsocket(conn) + 1, &input_mask, NULL, NULL, timeoutptr);
571-
if (r == 0 || (r < 0 && errno == EINTR))
571+
if (r == 0)
572+
{
573+
int64 now = feGetCurrentTimestamp();
574+
sendFeedback(conn, now, nodeId);
575+
continue;
576+
}
577+
else if (r < 0 && errno == EINTR)
572578
{
573579
/*
574580
* 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