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 1lni5s-00071r-3S for pgsql-hackers@arkaria.postgresql.org; Mon, 31 May 2021 13:36:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lni5q-00069D-W0 for pgsql-hackers@arkaria.postgresql.org; Mon, 31 May 2021 13:36:34 +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 1lni5q-000695-Oc for pgsql-hackers@lists.postgresql.org; Mon, 31 May 2021 13:36:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lni5o-0001QT-Rp for pgsql-hackers@postgresql.org; Mon, 31 May 2021 13:36:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 14VDaKcM2566987; Mon, 31 May 2021 09:36:20 -0400 From: Tom Lane To: Michael Paquier 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 In-reply-to: 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> Comments: In-reply-to Michael Paquier message dated "Mon, 31 May 2021 15:31:08 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2566985.1622468180.1@sss.pgh.pa.us> Date: Mon, 31 May 2021 09:36:20 -0400 Message-ID: <2566986.1622468180@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Mon, May 31, 2021 at 12:05:12AM -0400, Tom Lane wrote: >> 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"? > 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. Interesting --- I was considering running such a test locally, but didn't get round to it yet. > Leaving the specific > topic of this thread aside for one moment, would there be an argument > for just enforcing gssencmode=disable in this set of tests down to 12? It seems like the ideal solution would be to make pg_GSS_have_cred_cache smarter, so that we don't attempt a GSS connection cycle here. But if we can't, adding gssencmode=disable to these test cases is what I was thinking about, too. > 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.. Agreed, that seems bogus. regards, tom lane