Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+8-2
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)