Re: BUG #17032: wrong password cause double connect and double error - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #17032: wrong password cause double connect and double error
Date
Msg-id YK2vI8hsMu6razsv@paquier.xyz
Whole thread Raw
In response to Re: BUG #17032: wrong password cause double connect and double error  (RekGRpth <rekgrpth@gmail.com>)
List pgsql-bugs
On Tue, May 25, 2021 at 07:10:11PM +0500, RekGRpth wrote:
> Ok, thanks. But, Why try to re-establish a known unsuccessful
> connection? (because wrong password)

Because that's the way the default behavior of sslmode works, and
because it is simpler to work this way in libpq by making all failures
reported by the backend work the same way on the client side:
https://www.postgresql.org/docs/devel/libpq-connect.html#LIBPQ-CONNECT-SSLMODE

(I agree that this is an unsafe default choice, and we've discussed
about changing to a saner default.)
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17034: Creating aggregate function based on array_append now results in "function does not exist" error
Next
From: PG Bug reporting form
Date:
Subject: BUG #17035: assert after commit