Re: replication_timeout does not seem to be working - Mailing list pgsql-admin

From Fujii Masao
Subject Re: replication_timeout does not seem to be working
Date
Msg-id CAHGQGwECxW=J49D3BL7dPmvGt+K34y=caM8tjYZaceZ1EoiQ=A@mail.gmail.com
Whole thread Raw
In response to Re: replication_timeout does not seem to be working  (alexondi <alexondi@rambler.ru>)
List pgsql-admin
On Tue, Aug 23, 2011 at 5:49 PM, alexondi <alexondi@rambler.ru> wrote:
>>If no reply is returned from the standby in replication_timeout, the master
> thinks
>>that the connected standby is inactive, and terminates the replication
> connection.
>>This is useful for the master to detect a standby crash or network outage.
>
> After that master commit current transaction with "local" synchronous_commit
> or rollback?

Even after the timeout terminates replication connection, a transaction on the
master waits for its WAL to be replicated to at least one standby. If you want
to finish such a transaction, you have to disable synchronous replication (by
changing synchronous_commit or synchronous_standby_names), or start new
standby and wait for WAL to be replicated to that new standby.

> And why I setup this parameter replication_timeout = 2s and my wal's thread
> (on master and server are restarted within 2s)?

You are asking whether the master and standby are automatically restarted
within 2s after they crash? If so, No.

Regards,

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

pgsql-admin by date:

Previous
From: alexondi
Date:
Subject: Re: replication_timeout does not seem to be working
Next
From: Florian Weimer
Date:
Subject: Database alias