Thread: Re: »Ø¸´:Re: »Ø¸´:Re: [BUGS] BUG #5853: when the walsender cannot exit when reboot slave computer
Re: »Ø¸´:Re: »Ø¸´:Re: [BUGS] BUG #5853: when the walsender cannot exit when reboot slave computer
From
Heikki Linnakangas
Date:
(I repeat: please keep the mailing list cc'd so that other can help) On 28.01.2011 08:49, zoulx1982 wrote: > when the slave computer is reset , there are two situation: > 1. the primary don't produce WAL, so walsender won't send any XLOG > I use "netstat -anp | grep postgres" to find the connection state is ESTABLISHED > > 2. the primary produce WAL and need to send to walreceiver, but there need a long time to wait timeout(about 15 minutes) > in this situation, the connection state is also ESTABLISHED Yeah, 15 minutes is the timeout in TCP. I don't remember if that's just a default that can be changed in the OS, or a requirement of the protocol. > whether we should set a reasonable timeout to avoid waiting long time? You can use tcp_keep_alive_* settings to somewhat alleviate that (see manual http://www.postgresql.org/docs/9.0/interactive/warm-standby.html#STREAMING-REPLICATION), but other than that there's currently no application-level timeout. A lingering walsender shouldn't normally cause any problems, though, it will timeout eventually. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com