Re: Suggestion for To Do List - Client timeout please. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Suggestion for To Do List - Client timeout please.
Date
Msg-id 8426.998315296@sss.pgh.pa.us
Whole thread Raw
In response to Suggestion for To Do List - Client timeout please.  (Grant <grant@conprojan.com.au>)
Responses Re: Suggestion for To Do List - Client timeout please.
List pgsql-hackers
Grant <grant@conprojan.com.au> writes:
> Possibly create a timeout for psql. pg_dump, pg_restore and other clients.
> If they can not connect to a certain host within a certain period it will
> quit with an error. I have psql's still running for 6 days from crontab
> that could not connect to a bogus IP address.

There is something wrong with your system, not with Postgres.  Any
reasonable TCP stack will time out within circa 1 minute if no response.

Example (sss is a machine on my LAN that's not presently up):

$ time psql -h sss
psql: PQconnectPoll() -- connect() failed: Connection timed out       Is the postmaster running (with -i) at 'sss'
and accepting connections on TCP/IP port '5432'?
 

real    1m14.27s
user    0m0.01s
sys     0m0.01s
$

This particular timeout length is probably specific to HPUX, but the
point is that you have a local system problem.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Karel Zak
Date:
Subject: encoding: ODBC, createdb
Next
From: Peter Moscatt
Date:
Subject: CREATEDB Where ??