Re: [HACKERS] Timeout and wait-forever in sync rep

2010-12-05 Thread Fujii Masao
On Fri, Oct 15, 2010 at 9:41 PM, Fujii Masao masao.fu...@gmail.com wrote: The timeout doesn't oppose to 'wait-forever'. Even if you choose 'wait -forever' (i.e., you set allow_standalone_master to false), the master should detect the standby crash as soon as possible by using the timeout. For

Re: [HACKERS] Timeout and wait-forever in sync rep

2010-12-05 Thread Heikki Linnakangas
On 06.12.2010 07:42, Fujii Masao wrote: On Fri, Oct 15, 2010 at 9:41 PM, Fujii Masaomasao.fu...@gmail.com wrote: The timeout doesn't oppose to 'wait-forever'. Even if you choose 'wait -forever' (i.e., you set allow_standalone_master to false), the master should detect the standby crash as soon

Re: [HACKERS] Timeout and wait-forever in sync rep

2010-10-21 Thread Bruce Momjian
Fujii Masao wrote: Hi, As the result of the discussion, I think that we need the following two parameters for the case where the standby goes down. Can we have a parameter that calls a operating system command when a standby is declared dead, to notify the administrator? -- Bruce Momjian

Re: [HACKERS] Timeout and wait-forever in sync rep

2010-10-21 Thread Fujii Masao
On Fri, Oct 22, 2010 at 7:33 AM, Bruce Momjian br...@momjian.us wrote: Fujii Masao wrote: Hi, As the result of the discussion, I think that we need the following two parameters for the case where the standby goes down. Can we have a parameter that calls a operating system command when a

Re: [HACKERS] Timeout and wait-forever in sync rep

2010-10-18 Thread Fujii Masao
On Sat, Oct 16, 2010 at 12:43 AM, Simon Riggs si...@2ndquadrant.com wrote: 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? The keepalives don't work at least on linux when the

Re: [HACKERS] Timeout and wait-forever in sync rep

2010-10-18 Thread Greg Stark
On Mon, Oct 18, 2010 at 12:03 AM, Fujii Masao masao.fu...@gmail.com wrote: The keepalives don't work at least on linux when the connection is terminated after sending a packet and before receiving TCP-level ACK. You can confirm this by unplugging the LAN cable from a client server while running

Re: [HACKERS] Timeout and wait-forever in sync rep

2010-10-18 Thread Fujii Masao
On Tue, Oct 19, 2010 at 1:06 AM, Greg Stark gsst...@mit.edu wrote: On Mon, Oct 18, 2010 at 12:03 AM, Fujii Masao masao.fu...@gmail.com wrote: The keepalives don't work at least on linux when the connection is terminated after sending a packet and before receiving TCP-level ACK. You can confirm

Re: [HACKERS] Timeout and wait-forever in sync rep

2010-10-18 Thread Greg Stark
On Mon, Oct 18, 2010 at 10:24 PM, Fujii Masao masao.fu...@gmail.com wrote: I mean, for example, that the server cannot detect the disconnection for more than 60 seconds even if the user configures the keepalive as follows.    tcp_keepalives_idle      = 10    tcp_keepalives_interval  = 5    

Re: [HACKERS] Timeout and wait-forever in sync rep

2010-10-16 Thread Robert Haas
On Fri, Oct 15, 2010 at 8:41 AM, Fujii Masao masao.fu...@gmail.com wrote: Hi, 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

Re: [HACKERS] Timeout and wait-forever in sync rep

2010-10-15 Thread Simon Riggs
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

Re: [HACKERS] Timeout and wait-forever in sync rep

2010-10-15 Thread Stefan Kaltenbrunner
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

Re: [HACKERS] Timeout and wait-forever in sync rep

2010-10-15 Thread Simon Riggs
On Fri, 2010-10-15 at 18:51 +0200, Stefan Kaltenbrunner wrote: 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