Re: Heartbeat between Primary and Standby replicas - Mailing list pgsql-hackers

From fazool mein
Subject Re: Heartbeat between Primary and Standby replicas
Date
Msg-id AANLkTimE0CkuPNVMGdCOXbA8m1Ro6zRHPndu4JJ_v5EY@mail.gmail.com
Whole thread Raw
In response to Re: Heartbeat between Primary and Standby replicas  (fazool mein <fazoolmein@gmail.com>)
Responses Re: Heartbeat between Primary and Standby replicas
List pgsql-hackers
Hello again,

I checked the code for the keepalive feature. It seems that the socket options are only set on the primary's socket connection. The tcp connection created on the secondary for walreceiver does not use the keepalive parameters from the configuration.

Am I correct? Is this intended or some bug?

Thanks.



On Fri, Sep 17, 2010 at 7:05 PM, fazool mein <fazoolmein@gmail.com> wrote:
Apologies. I'm new to Postgres and I didn't see that feature. It satisfies what I want to do.

Thanks.


On Thu, Sep 16, 2010 at 7:34 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
On Fri, Sep 17, 2010 at 6:49 AM, fazool mein <fazoolmein@gmail.com> wrote:
> I am designing a heartbeat system between replicas to know when a replica
> goes down so that necessary measures can be taken. As I see, there are two
> ways of doing it:
>
> 1) Creating a separate heartbeat process on replicas.
> 2) Creating a heartbeat message, and sending it over the connection that is
> already established between walsender and walreceiver.
>
> With 2, sending heartbeat from walsender to walreceiver seems trivial.
> Sending a heartbeat from walreceiver to walsender seems tricky. Going
> through the code, it seems that the walreceiver is always in the
> PGASYNC_COPY_OUT mode (except in the beginning when handshaking is done).
>
> Can you recommend the right way of doing this?

The existing keepalive feature doesn't help?

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: recovery.conf location
Next
From: Fujii Masao
Date:
Subject: Re: Heartbeat between Primary and Standby replicas