Re: psql connection timeout

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: John DeSoi <desoi(at)pgedit(dot)com>
Cc: Pgsql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: psql connection timeout
Date: 2004-12-03 04:53:16
Message-ID: 20041203045316.GA33041@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Maksim Likharev 2004-12-03 04:59:03 Re: Get diagnistic (row_count) 7.3 vs. 7.4 changes
Previous Message John DeSoi 2004-12-03 04:32:34 psql connection timeout