Re: BUG #17032: wrong password cause double connect and double error

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: RekGRpth <rekgrpth(at)gmail(dot)com>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17032: wrong password cause double connect and double error
Date: 2021-05-26 02:14:59
Message-ID: YK2vI8hsMu6razsv@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2021-05-26 06:55:18 BUG #17035: assert after commit
Previous Message PG Bug reporting form 2021-05-25 22:58:31 BUG #17034: Creating aggregate function based on array_append now results in "function does not exist" error