Skip to content

Commit 86ece4b

Browse files
Turn off WalSender keepalives by default, users can enable if desired
1 parent 6a2cbe1 commit 86ece4b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/backend/replication/walsender.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ WalSndLoop(void)
834834

835835
if (pq_is_send_pending())
836836
wakeEvents |= WL_SOCKET_WRITEABLE;
837-
else
837+
else if (MyWalSnd->sendKeepalive)
838838
{
839839
WalSndKeepalive(output_message);
840840
/* Try to flush pending output to the client */

src/include/replication/walsender_private.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ typedef struct WalSnd
3737
XLogRecPtr sentPtr; /* WAL has been sent up to this point */
3838
bool needreload; /* does currently-open file need to be
3939
* reloaded? */
40+
bool sendKeepalive; /* do we send keepalives on this connection? */
4041

4142
/*
4243
* The xlog locations that have been written, flushed, and applied by

0 commit comments

Comments
 (0)