mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +03:00
Turn off WalSender keepalives by default, users can enable if desired
This commit is contained in:
@ -834,7 +834,7 @@ WalSndLoop(void)
|
|||||||
|
|
||||||
if (pq_is_send_pending())
|
if (pq_is_send_pending())
|
||||||
wakeEvents |= WL_SOCKET_WRITEABLE;
|
wakeEvents |= WL_SOCKET_WRITEABLE;
|
||||||
else
|
else if (MyWalSnd->sendKeepalive)
|
||||||
{
|
{
|
||||||
WalSndKeepalive(output_message);
|
WalSndKeepalive(output_message);
|
||||||
/* Try to flush pending output to the client */
|
/* Try to flush pending output to the client */
|
||||||
|
@ -37,6 +37,7 @@ typedef struct WalSnd
|
|||||||
XLogRecPtr sentPtr; /* WAL has been sent up to this point */
|
XLogRecPtr sentPtr; /* WAL has been sent up to this point */
|
||||||
bool needreload; /* does currently-open file need to be
|
bool needreload; /* does currently-open file need to be
|
||||||
* reloaded? */
|
* reloaded? */
|
||||||
|
bool sendKeepalive; /* do we send keepalives on this connection? */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The xlog locations that have been written, flushed, and applied by
|
* The xlog locations that have been written, flushed, and applied by
|
||||||
|
Reference in New Issue
Block a user