Re: Possible PostgreSQL 8.3beta4 bug with MD5 authentication in psql?

From: Mark Cave-Ayland <mark(dot)cave-ayland(at)ilande(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Dave Page <dpage(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Possible PostgreSQL 8.3beta4 bug with MD5 authentication in psql?
Date: 2007-12-08 17:11:57
Message-ID: 1197133917.23281.14.camel@mca-desktop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2007-12-08 at 10:09 -0500, Tom Lane wrote:

> > My vote goes to (3), if the work can be done quickly, or (1) if it
> > can't.

Ditto.

> I don't think it's a big problem to do, as long as we are agreed on
> the behavior we want. In particular, consider:
>
> 1. If libpq obtains a password internally (ie, from PGPASSWORD or
> ~/.pgpass), and it's wrong, do we want a user password prompt?
>
> 2. If we prompt the user for a password, and it's wrong, do we
> want to try again?
>
> Our historical behavior on both points was "no", but at least
> the second one seems a bit questionable.

I'd say that you definitely don't want a user password prompt if libpq's
password is wrong, since I can see this would break a lot of scripts
that weren't launched directly from the shell - the switch from
non-interactive to interactive would cause the script to hang in the
background rather than return immediately with an error (indeed it was
this confusing symptom in the PostGIS installer that flagged the change
in behaviour).

As for the second point, I'm not too worried about how many times you
are asked for the password - I personally am happy with the one attempt
as it stands at the moment. My main concern is the switch from a
non-interactive mode to an interactive mode.

Kind regards,

Mark.

--
ILande - Open Source Consultancy
http://www.ilande.co.uk

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-12-08 17:29:39 Re: Release Note Changes
Previous Message Andrew Dunstan 2007-12-08 16:34:35 Re: buildenv.pl/buildenv.bat