Skip site navigation (1) Skip section navigation (2)

Re: 回复:Re: 回复:Re: [BUGS] BUG #5853: when the walsender cannot exit when reboot slave computer

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: zoulx1982 <zoulx1982(at)163(dot)com>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: 回复:Re: 回复:Re: [BUGS] BUG #5853: when the walsender cannot exit when reboot slave computer
Date: 2011-01-28 09:15:07
Message-ID: 4D42891B.7040609@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-bugs
(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

pgsql-bugs by date

Next:From: Robert HaasDate: 2011-01-28 13:47:34
Subject: Re: BUG #5851: ROHS (read only hot standby) needs to be restarted manually in somecases.
Previous:From: Peter EisentrautDate: 2011-01-27 20:56:22
Subject: Re: Bug in italian help of "pg_dumpall"

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group