On Sun, Sep 15, 2019 at 09:44:14AM -0600, Michael Loftis wrote:
On Sun, Sep 15, 2019 at 08:36 Virendra Negi <viren.n...@teliax.com> wrote:

Oh I miss the documentation link there you go
https://www.postgresql.org/docs/9.5/protocol-replication.html

On Sun, Sep 15, 2019 at 8:05 PM Virendra Negi <viren.n...@teliax.com>
wrote:

Agreed but why is there a message specification for it describe in the
documentation  and it ask to client reply back if a particular *bit* is
set.(1 means that the client should reply to this message as soon as
possible, to avoid a timeout disconnect. 0 otherwise)


This is unrelated to TCP keepalive. I honestly don't know where the knob is
to turn these on but the configuration variables you quoted earlier I am
familiar with and they are not it. Perhaps someone else can chime in with
how to enable the protocol level keepalive in replication.


Pretty sure it's wal_sender_timeout. Which by default is 60s, but if you
tune it down it should send keepalives more often.

See WalSndKeepaliveIfNecessary in [1]:

[1] 
https://github.com/postgres/postgres/blob/master/src/backend/replication/walsender.c#L3425

regards

--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Reply via email to