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

From Stefan Kaltenbrunner
Subject Re: Timeout and wait-forever in sync rep
Date
Msg-id 4CB886A1.4060608@kaltenbrunner.cc
Whole thread Raw
In response to Re: Timeout and wait-forever in sync rep  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Timeout and wait-forever in sync rep
List pgsql-hackers
On 10/15/2010 05:43 PM, Simon Riggs wrote:
> 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?

well tcp level keepalives are not terribly portable(or can only be 
partially controlledd from the app) and on some platforms have lower 
limits that are in the minutes which is too long for a lot of usecases.
The keepalive usage we have in 9.0 is mostly for removing an annoyance 
on some major platforms but depending on them for a major feature like 
timeouts in sync rep is probably not a good idea.



Stefan


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: First patch proposal
Next
From: Tom Lane
Date:
Subject: Re: Re: starting to review the Extend NOT NULL representation to pg_constraint patch