Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llj4g-0003zr-C1 for pgsql-bugs@arkaria.postgresql.org; Wed, 26 May 2021 02:15:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1llj4f-0006vI-Ab for pgsql-bugs@arkaria.postgresql.org; Wed, 26 May 2021 02:15:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llj4f-0006v9-3n for pgsql-bugs@lists.postgresql.org; Wed, 26 May 2021 02:15:09 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llj4c-0002X9-Nv for pgsql-bugs@lists.postgresql.org; Wed, 26 May 2021 02:15:08 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 9A683FA5; Tue, 25 May 2021 22:15:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 25 May 2021 22:15:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=NKrNdlaNj3xkGQfadW10Uac73W+ lPTMT6EzVXQ+vZqw=; b=YTpXbZ6YHPhPvUj00I0nRNVZUwj3HnTkkOvt5KIkOgE ekrWOoRauPZrDu+bFFVXce8EtUZi+26DEIkqui7VN4v82eED9SYUfgbqFz7ab5BG tUx4ZLImASzqPoRScu39BVENZLJAXl3tbKXJwN6SKnpUcuH2oi5iSszTY4OdUEpw JKujsvCxvuDzOVcPx6jS6j/n8Nza/Ez6oaV+UhSv49xfCQziNMRbnQumsteY+QRv SEQRoWeowac+Xo2AVoLosvDgtzIP+bnQkc4Ft6Gs6k3EncGLLQot63sfon9pFtWK WPp+hV/cB26diBEN5TkS15APnxsIAvGs7sjmo40DJZA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=NKrNdl aNj3xkGQfadW10Uac73W+lPTMT6EzVXQ+vZqw=; b=FLjO2QFpBSgSowyWZPoNoG M9noIrCk+vS+qs8YFzDWIPIy6kpsfcspyY0i+uC0ZCy98TbZhWwcbeK9aPA/1IQ8 HfyKZfG3FtQXJNyLWz87RLDm9duiyWIi8jIRruiUlo2HCFcMcwO4GjWsNwlIMb4t 9YyGilmixdaIq0Ss0eo7j+6DB27xwGtEPaiTI/rlH53BNpyzzHocIsAUiLUPCzDl ASuNTEvTAJAFAkgIkLbHNFEwPVUsi0prIBDpWQVXffhA97TOOURufGD9MAnMHloj WkIZ8O3YY+dlsVh2uVkO9MmE/2WF7aDT1JF/5U0MXnvdEM01ljNNK9Vt9EiWWatg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdekvddgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeffudeffeelgffhkedukeekvedv udfgieetkeekudelfeevhffhffdtudffieeutdenucffohhmrghinhepphhoshhtghhrvg hsqhhlrdhorhhgnecukfhppeduuddurddutddvrddukedtrddukeehnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqh huihgvrhdrgiihii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 May 2021 22:15:02 -0400 (EDT) Date: Wed, 26 May 2021 11:14:59 +0900 From: Michael Paquier To: RekGRpth Cc: Jeff Janes , pgsql-bugs Subject: Re: BUG #17032: wrong password cause double connect and double error Message-ID: References: <17032-7ad69968e744de35@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="j29M0o5mlV2zeoTn" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --j29M0o5mlV2zeoTn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --j29M0o5mlV2zeoTn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmCtryMACgkQnvQgOdby QH0C6A//ZFuJCF97Ma/Qfh6NfOfxDtl8AlEv+Iuyyp4rPwbWymOu9/nsPWy8ibz4 fbXvaLz/Wx0EDZGplTO46eJdx4ccf6SgtRPdwroEEqXQI5dSCf+V/bOH8beLEQhr i5riO+7N5mCnX5KE/XYVq0LP+lD1XIs9BEFxz5QsfoXUf9TuV4ElQmKS9ERtNN6w y6BapMs21TN+4iYWdVphGWVmowTM0P7y4NGFjTWel9YGY/1veZ9BxCoTs2V2pnpQ 1xAmfMrElLYzENghPh+QEGKhVV4soIircG0gHgyqPNJpaip0OfqAZnBHmbJ6F8p8 tMRNgoERCkZX6w/YSY47tjBE9KETlJ8CDCGX5nVu5OmH7EI1z0HtbeZpWK8iXTVX UyklYtCl6vpRnBhRfzlHldWTaaXEbQGJ8pB9JCcmpWFzXSRzpkhbcWWfoE636Zka CqfECKAYE6wtE24yo6bFTWSGgcQsF+R0tMEGcjhm9cwHUHCx7rzRkXUg4cEEAn+k NJBA7CUcPkNhxQ4JwLYA0fONLvK6pcZxcExKYZSbhixZggaT+eZeVxxNUoY7vATS pA42tCIxCW0jY2bcOHqzqjfceMdziSwAQDwbElemmIeCphxjFqsMGv+AEuPm72b6 6Y+guR9+Hy67RafkUkU1KWz6/TvJxfXKvaug7j+ditW/wktz3FQ= =Tvkn -----END PGP SIGNATURE----- --j29M0o5mlV2zeoTn--