Skip to content

Commit da4efa1

Browse files
Turn off WalSender keepalives by default, users can enable if desired
1 parent 87d8bd7 commit da4efa1

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
@@ -837,7 +837,7 @@ WalSndLoop(void)
837837

838838
if (pq_is_send_pending())
839839
wakeEvents |= WL_SOCKET_WRITEABLE;
840-
else
840+
else if (MyWalSnd->sendKeepalive)
841841
{
842842
WalSndKeepalive(output_message);
843843
/* 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)