postgres.git / summary / log / commit / refs

commit    86ece4bff648364ece3cf03c0e7bfbe9fb3fc8cd
Author:   Simon Riggs <simon@2ndQuadrant.com>
Date:     Thu Aug 09 16:06:47 2012 +0000

    Turn off WalSender keepalives by default, users can enable if desired


src/backend/replication/walsender.c | 2 +- src/include/replication/walsender_private.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index 53e134538f4..3f060b82c09 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -834,7 +834,7 @@ WalSndLoop(void) if (pq_is_send_pending()) wakeEvents |= WL_SOCKET_WRITEABLE; - else + else if (MyWalSnd->sendKeepalive) { WalSndKeepalive(output_message); /* Try to flush pending output to the client */ diff --git a/src/include/replication/walsender_private.h b/src/include/replication/walsender_private.h index 66234cd8b59..45cd7444cdf 100644 --- a/src/include/replication/walsender_private.h +++ b/src/include/replication/walsender_private.h @@ -37,6 +37,7 @@ typedef struct WalSnd XLogRecPtr sentPtr; /* WAL has been sent up to this point */ bool needreload; /* does currently-open file need to be * reloaded? */ + bool sendKeepalive; /* do we send keepalives on this connection? */ /* * The xlog locations that have been written, flushed, and applied by [parent: 6a2cbe12358d]