Re: equivalent to "replication_timeout" on standby server - Mailing list pgsql-general

From Fujii Masao
Subject Re: equivalent to "replication_timeout" on standby server
Date
Msg-id CAHGQGwHWYxgXnnsDSL7UifSyDSdZNPZWSTWQX7kXdDw5SUOfzQ@mail.gmail.com
Whole thread Raw
In response to Re: equivalent to "replication_timeout" on standby server  (Samba <saasira@gmail.com>)
List pgsql-general
On Fri, Nov 4, 2011 at 10:58 PM, Samba <saasira@gmail.com> wrote:
> although both master(with replication_timeout)  and slave (with tcp timeout
> option in primary_conninfo parameter) closes the connection in quick time
> (based on tcp idle connection  timeout), as of now they do not log such
> information. It would be really helpful if such disconnects are logged with
> appropriate severity so that the problem can identified early and help in
> keeping track of patterns and history of such issues.

Oh, really? Unless I'm missing something, when replication timeout happens,
the following log message would be logged in the master:

    terminating walsender process due to replication timeout

OTOH, something like the following would be logged in the standby:

    could not receive data from WAL stream......

> Presently, neither master nor standby server attempts to resume streaming
> replication when they happen to see each other after some prolonged
> disconnect. It would be better if either master or slave or both the servers
> makes periodic checks to find if the other is reachable and resume the
> replication( if possible, or else log the message that a full sync may be
> required).

The standby periodically tries reconnecting to the master after it detects
the termination of replication connection. So even after prolonged disconnect,
replication can automatically resume.

Regards,

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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: Re: [GENERAL] Named / preparsed / preplaned(prepared) queries - Feature proposal
Next
From: Fujii Masao
Date:
Subject: Re: Streaming Replication woes