pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: RekGRpth <rekgrpth@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17032: wrong password cause double connect and double error
Date: Wed, 26 May 2021 11:14:59 +0900
Message-ID: <YK2vI8hsMu6razsv@paquier.xyz> (raw)
In-Reply-To: <CAPgh2mLRKcKyS6s6bE+heMjgD8i2AOpN0W5=Ur4VSgN2i=zQCw@mail.gmail.com>
References: <17032-7ad69968e744de35@postgresql.org>
	<CAMkU=1y7va3iYKYtjs50FvfWE-frPjKzwQUm0-xf4jazf42tsw@mail.gmail.com>
	<CAPgh2mLRKcKyS6s6bE+heMjgD8i2AOpN0W5=Ur4VSgN2i=zQCw@mail.gmail.com>

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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (5+ messages)

Message-ID: <YK2vI8hsMu6razsv@paquier.xyz>
Permalink:  ../YK2vI8hsMu6razsv@paquier.xyz/
Also on:    postgresql.org/message-id/YK2vI8hsMu6razsv@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, rekgrpth@gmail.com, jeff.janes@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17032: wrong password cause double connect and double error
  In-Reply-To: <YK2vI8hsMu6razsv@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox