Re: Timeout and wait-forever in sync rep - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Timeout and wait-forever in sync rep
Date
Msg-id 1287157391.1725.1582.camel@ebony
Whole thread Raw
In response to Timeout and wait-forever in sync rep  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Timeout and wait-forever in sync rep
Re: Timeout and wait-forever in sync rep
List pgsql-hackers
On Fri, 2010-10-15 at 21:41 +0900, Fujii Masao wrote:

> As the result of the discussion, I think that we need the following two
> parameters for the case where the standby goes down.

> * replication_timeout
>   This is the maximum time to wait for the ACK from the standby. If this
>   timeout expires, the master closes the replication connection and
>   disconnects the standby. This parameter is just used for the master
>   to detect the standby crash or the network outage.
> 
>   We already have keepalive parameters for that purpose. 

Yes, I had thought we would just use the keepalives...

> But they cannot
>   detect the disconnection in some cases. So replication_timeout needs
>   to be introduced for sync rep.

When exactly don't the keepalives work?

> * allow_standalone_master
>   This specifies whether we allow the master to process transactions
>   alone when there is no connected and sync'd standby.
> 
>   If this is false, all the transactions on the master are blocked until
>   sync'd standby has appeared. Of course, this happen not only when
>   replication_timeout expires but also when we start the master alone
>   at the initial setup, when the master detects the disconnection by
>   using keepalive parameters, and when the standby is shut down normally.
>   People who want 'wait-forever' will disable this parameter to reduce
>   the risk of data loss.
> 
>   OTOH, if this is true, the absence of sync'd standby doesn't prevent
>   the master from processing transactions alone. People who want high
>   availability even though the risk of data loss increases will enable
>   this parameter.

OK

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Development, 24x7 Support, Training and Services



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Foreign Visual Studio builds
Next
From: Teodor Sigaev
Date:
Subject: Re: knngist - 0.8