Re: libpq should append auth failures, not overwrite - Mailing list pgsql-hackers

From Tom Lane
Subject Re: libpq should append auth failures, not overwrite
Date
Msg-id 10646.1534349155@sss.pgh.pa.us
Whole thread Raw
In response to Re: libpq should append auth failures, not overwrite  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: libpq should append auth failures, not overwrite
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Aug 15, 2018 at 11:53 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> As soon as you have multiple target hosts, though, the current code's
>> behavior is inadequate IMO.

> I'm not entirely convinced; see the example I posted before.

TBH I find your example to be the exact opposite of convincing.
You've cherry-picked a case where the current behavior tells you
what you need to know and not anything you don't, but very small
variations on the case make that not hold anymore.  Remember the
complaint we started with, which was that if you get a bad-password
error it's not apparent which host gave that response.  If, in
fact, the hosts you've listed don't all use the same password,
you could be tearing your hair out for quite awhile before you
figure out what's going wrong.

In any case, I'm a little bit confused as to why someone who'd
listed multiple hosts would be surprised to see that the connection
had in fact fallen back to not-the-first host.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Facility for detecting insecure object naming
Next
From: Stephen Frost
Date:
Subject: Re: C99 compliance for src/port/snprintf.c