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 Masao 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

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 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 example, imagine t

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 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 > standby

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 Momj

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 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 >    tcp_keepalives_co

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 wrote: > On Mon, Oct 18, 2010 at 12:03 AM, Fujii Masao 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 ca

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 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 pgbench > on a cli

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 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 connection is term

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 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 this >  timeou

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 t

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 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 exp

[HACKERS] Timeout and wait-forever in sync rep

2010-10-15 Thread Fujii Masao
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 this timeout expires, the master closes the replication connection and dis