Re: psql trying twice to connect to local DB - Mailing list pgsql-general

From Tom Lane
Subject Re: psql trying twice to connect to local DB
Date
Msg-id 3202243.1696720486@sss.pgh.pa.us
Whole thread Raw
In response to psql trying twice to connect to local DB  (Steve Baldwin <steve.baldwin@gmail.com>)
List pgsql-general
Steve Baldwin <steve.baldwin@gmail.com> writes:
> If I make a connection to that DB from most clients I see log entries like
> this:
> ...
> If however I use psql I see two connection log entries - sometimes almost a
> second apart. For example:

These log entries show that you're using password-based authentication.
I believe what is happening is that psql tries to connect, discovers
that it needs a password, and then tries again after it's got a
password.  The delay would correspond to the time for you to type
your password (I take it you're a fast typist).

If you don't like the extra log entries, there's a command-line
switch that forces psql to prompt for password before connecting
the first time.  Of course, that might result in prompting for
a password that's not really needed.

            regards, tom lane



pgsql-general by date:

Previous
From: Steve Baldwin
Date:
Subject: Re: psql trying twice to connect to local DB
Next
From: Ron
Date:
Subject: Re: psql trying twice to connect to local DB