Re: psql connection timeout - Mailing list pgsql-general

From Michael Fuhr
Subject Re: psql connection timeout
Date
Msg-id 20041203045316.GA33041@winnie.fuhr.org
Whole thread Raw
In response to psql connection timeout  (John DeSoi <desoi@pgedit.com>)
Responses Re: psql connection timeout  (John DeSoi <desoi@pgedit.com>)
List pgsql-general
On Thu, Dec 02, 2004 at 11:32:34PM -0500, John DeSoi wrote:

> Is there a way to control how long psql waits for a connection? If the
> host IP address is mistyped, psql (8.0b4) hangs for over a minute on OS
> X.

Try setting the PGCONNECT_TIMEOUT environment variable:

env PGCONNECT_TIMEOUT=5 psql -h bogushost

If you always want to use a particular timeout then set the environment
variable in your shell's startup script.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: "Gary Winslow"
Date:
Subject: PostgresSQL Beta 5 Install Problem on Windows Server 2003
Next
From: Maksim Likharev
Date:
Subject: Re: Get diagnistic (row_count) 7.3 vs. 7.4 changes