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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers