summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Munro2022-11-16 22:30:14 +0000
committerThomas Munro2022-11-16 22:30:14 +0000
commit5db195f76f279a120edee448ad74d43578f56edd (patch)
treedf40c496ebaee39e9a5c039c06d959a86337f021
parente9e26b5e7166e6f1873efd58f3d5a4ba22cc3d8f (diff)
Fix slowdown in TAP tests due to recent walreceiver change.
Commit 05a7be93 changed the timing of the first reply sent by a walreceiver, which caused a few TAP tests that call wait_for_catchup() when they haven't actually streamed anything yet to wait ~10 seconds (wal_receiver_status_interval). Before commit 05a7be93 the initial reply was sent after 100ms, but there's no reason not to send it immediately as a slight improvement. Do the same for HS feedback for consistency. Author: Nathan Bossart <[email protected]> Discussion: https://postgr.es/m/742545.1668377284%40sss.pgh.pa.us
-rw-r--r--src/backend/replication/walreceiver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/replication/walreceiver.c b/src/backend/replication/walreceiver.c
index 8bd2ba37dd..ad383dbcaa 100644
--- a/src/backend/replication/walreceiver.c
+++ b/src/backend/replication/walreceiver.c
@@ -433,6 +433,10 @@ WalReceiverMain(void)
for (int i = 0; i < NUM_WALRCV_WAKEUPS; ++i)
WalRcvComputeNextWakeup(i, now);
+ /* Send initial reply/feedback messages. */
+ XLogWalRcvSendReply(true, false);
+ XLogWalRcvSendHSFeedback(true);
+
/* Loop until end-of-streaming or error */
for (;;)
{