Re: Psql or test application hangs when interface is down for the DB server - Mailing list pgsql-bugs

From Gregory Stark
Subject Re: Psql or test application hangs when interface is down for the DB server
Date
Msg-id 87wsjl4tuk.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Psql or test application hangs when interface is down for the DB server  (Valentin Bogdanov <valiouk@yahoo.co.uk>)
Responses Re: Psql or test application hangs when interface is down for the DB server
Re: Psql or test application hangs when interface is down for the DB server
List pgsql-bugs
"Valentin Bogdanov" <valiouk@yahoo.co.uk> writes:

> I have noticed this as well. Blocks in poll(), timeout parameter -1,

Oh good point. non-blocking sockets and poll/select let you control the
timeout too.

> meaning infinite then after 4 minutes on my system poll() returns 1 and
> getsockopt() is called with SO_ERROR. SYN packets are tried only for the
> default tcp timeout of 20 seconds.

Uhm, 20 seconds would be an unreasonably low default. I think the RFCs mandate
timeouts closer to the 4 minutes you describe.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's RemoteDBA services!

pgsql-bugs by date:

Previous
From: Valentin Bogdanov
Date:
Subject: Re: Psql or test application hangs when interface is down for the DB server
Next
From: Valentin Bogdanov
Date:
Subject: Re: Psql or test application hangs when interface is down for the DB server