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 1lnbSw-0005Jh-HV for pgsql-hackers@arkaria.postgresql.org; Mon, 31 May 2021 06:31:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lnbSO-0002zP-78 for pgsql-hackers@arkaria.postgresql.org; Mon, 31 May 2021 06:31:24 +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 1lnbSM-0002zH-Pl for pgsql-hackers@lists.postgresql.org; Mon, 31 May 2021 06:31:23 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lnbSI-0005Qk-RT for pgsql-hackers@postgresql.org; Mon, 31 May 2021 06:31:22 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 614545C019F; Mon, 31 May 2021 02:31:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 31 May 2021 02:31:15 -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=HNGZBivAWhkH4OasHHFIfxjG8fj QS67y/rdfn9SaiOg=; b=hXy2TXh9ndzEeGKS7RdNvw+NSmaVwdWosI/qvNbsZOe YuaEMev5trOI2k/EjF5MVmfUwprv19B9Lviyf8gVnJGXYE/hcyii2yI1nKxMOcTX hl5invDuSL4F5wp4/MUhIXtbiaPzSz290c9W8eKW2PzHUR778PbtUOk1lW+YdBOl Q+JKDAAIpCYPCE37jFKrfOXAoUEr4+6Zr/xbeHWHXaJnv79VjR5vnqLyGX/BOGjH 71drlkDf6riVRtpt9R6CL7kHZETPvFqb/gIYCToSrXhGG/60kqClpBYLvJu9drI4 kY8BWYPcAcO5Pq3k8x/5GXWogCnhmtv8BPotG2WoMOg== 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=HNGZBi vAWhkH4OasHHFIfxjG8fjQS67y/rdfn9SaiOg=; b=JTQBB30LaGAhSGtlglcdG4 l6eHiwNSU1gxWgejZM3cmf/yHUNDuCuPz9FIb8X5Gneqj6r6WOZQX65XPcjKK4uq 3b6LbJRcglj6CQrhRWVIJtdb1u1rkJJfg57uQB2DpgFqnQoxbo9W8RxUSeMxhaN6 L0pq70ljRxdUznJMPeM6PT/vQRGQptNJB1rv04onB8Ae7pmh4JZA2I5oII+ajdVv sWq7o4gQRyo16OKiGocATp8XBRKF3g6NVBdhx2KtYQQXjGwRS3w6W4gyhGTDaAQi CF/gBdtFNTBxuor3H3OD6qpu4J4tIPBTX2Pp47DSuZQBuaz4K/i1mR59g8wYRhHQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdelvddguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveej heehieevueeigeelteegleejleeiueeiheegvefhnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 31 May 2021 02:31:12 -0400 (EDT) Date: Mon, 31 May 2021 15:31:08 +0900 From: Michael Paquier To: Tom Lane Cc: Justin Pryzby , Hubert Zhang , tsunakawa.takay@fujitsu.com, pgsql-hackers@postgresql.org, Andreas Seltenreich , Bruce Momjian Subject: Re: Multiple hosts in connection string failed to failover in non-hot standby mode Message-ID: References: <229507.1610056206@sss.pgh.pa.us> <770711.1610318330@sss.pgh.pa.us> <20210506162651.GJ27406@telsasoft.com> <4170264.1620321747@sss.pgh.pa.us> <20210531012500.GP2082@telsasoft.com> <2522602.1622433912@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vlgQx4A1AKAL9xfR" Content-Disposition: inline In-Reply-To: <2522602.1622433912@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --vlgQx4A1AKAL9xfR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 31, 2021 at 12:05:12AM -0400, Tom Lane wrote: > Yeah, I was looking at that earlier today. Evidently libpq is > trying a GSS-encrypted connection, and that doesn't work, so > it falls back to a regular connection where we get the expected > error. Probably all the connections in this test are hitting the > GSS failure, but only the ones where the second attempt fails > show a visible issue. Yep. This wastes cycles. > What is not clear is why GSS is acting that way. We wouldn't > have tried a GSS connection unless pg_GSS_have_cred_cache > succeeded ... so how come that worked but then gss_init_sec_context > complained "Credential cache is empty"? >=20 > My rough guess is that Windows has implemented the GSS APIs in > such a way that what pg_GSS_have_cred_cache is testing isn't > sufficient to tell whether a sane credential actually exists. >=20 > Or there's something particularly weird about how hamerkop > is set up. I suspect that's just the way the upstream installation works with a credentials cache created from the beginning, as I see the same behavior and the same error on my own host for HEAD with a KRB5 server set up once the upstream installation runs. Leaving the specific topic of this thread aside for one moment, would there be an argument for just enforcing gssencmode=3Ddisable in this set of tests down to 12? It is worth noting that the problem does not show up in 12 and 13 once the compilation works, because we just mask the error there, but the code path is still taken. Another thing that strikes me as incorrect is that we don't unset PGGSSENCMODE or PGGSSLIB in TestLib.pm. Just noting it on the way.. -- Michael --vlgQx4A1AKAL9xfR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmC0gqwACgkQnvQgOdby QH0STg/+JcjwwCYmmBZBtpPniHGb/OdGTns/1LsEjyepQv+4c2f8ilPoblj16wyJ RogltwvVwKBRxGyHb8u30KDty0M/eMT++zZHpQ8V9uyTOM7G1f+ootlf32mREFLG j/eGntMtTGtaNnQRXvX8fd/UjtCSRWyH3vqH5AMBqmSM3bIJ86iP9nLqUd3T07Dj hgXHwtEW1rPJ7A0I2XtyOM+l78+Jl+1lqY6rSrQsL3RmJuBKVjF1moqidOjlj//D 6QHKdozcL8FgiU91Ln+rn7hBvuedwXJVFRRTncmN80jCAE238oJGCtrF07uCFHCJ he5aK475/beR5NdFDI0EGTG3ZtLS+vxoYpBGbgEdGknz9hVsII+KWtTzgZ0+FmC9 h3DXn8b8pSsV3r6xfNqGwLtAg3b59w984yvOFN0BtvIo+CTTB1vPzCUeCovt91y6 ESklg6ohw19dvlce9oFFR3FOSeH8LbXMD1MKInuGQ0JKBnw4J47rNkz77a/XQfRh zF+xuUilBJIfvqb4NaeeYO/FJPME6ENlNTjlxGx3oe286P6UjNNUIUWJVf2zUlM/ 9flJKKcYnJfITJR5Prh+DTegJZra8DqknQQ/cOd+TL+YGkrcDUx+Rv/IY/xrn7VZ ynLugP20wmnngFtyj5JrgOaE9TRJrwIkfwU9w0UduC8xbVRa/q0= =+Lat -----END PGP SIGNATURE----- --vlgQx4A1AKAL9xfR--