Re: Timeout and wait-forever in sync rep

From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Timeout and wait-forever in sync rep
Date: 2010-10-15 16:51:45
Message-ID: 4CB886A1.4060608@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-10-15 17:36:38 Re: Re: starting to review the Extend NOT NULL representation to pg_constraint patch
Previous Message Joshua D. Drake 2010-10-15 16:36:08 Re: First patch proposal