]> granicus.if.org Git - postgresql/commitdiff
Make walreceiver send a reply after receiving data but before flushing it.
authorRobert Haas <rhaas@postgresql.org>
Fri, 25 Mar 2011 15:23:39 +0000 (11:23 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 25 Mar 2011 15:28:16 +0000 (11:28 -0400)
It originally worked this way, but was changed by commit
a8a8a3e0965201df88bdfdff08f50e5c06c552b7, since which time it's been impossible
for walreceiver to ever send a reply with write_location and flush_location
set to different values.

src/backend/replication/walreceiver.c

index 47a980db203edbf0ab499e429bd708b5edb67475..f6259e4e30fcccd79248262be25b1044db1956f1 100644 (file)
@@ -317,6 +317,9 @@ WalReceiverMain(void)
                        while (walrcv_receive(0, &type, &buf, &len))
                                XLogWalRcvProcessMsg(type, buf, len);
 
+                       /* Let the master know that we received some data. */
+                       XLogWalRcvSendReply();
+
                        /*
                         * If we've written some records, flush them to disk and let the
                         * startup process and primary server know about them.