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 1odzXs-0000RJ-QH for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Sep 2022 19:50:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1odzXq-0003Ba-U1 for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Sep 2022 19:50:06 +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 1odzXq-0003BR-Lo for pgsql-bugs@lists.postgresql.org; Thu, 29 Sep 2022 19:50:06 +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 1odzXo-00070W-0H for pgsql-bugs@lists.postgresql.org; Thu, 29 Sep 2022 19:50:05 +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 28TJnwhC346264; Thu, 29 Sep 2022 15:49:59 -0400 From: Tom Lane To: heath.lord@crunchydata.com cc: Daniel Gustafsson , Jacob Champion , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17625: In PG15 PQsslAttribute returns different values than PG14 when SSL is not in use for the connection In-reply-to: <17625-fc47c78b7d71b534@postgresql.org> References: <17625-fc47c78b7d71b534@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Thu, 29 Sep 2022 18:23:20 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <346262.1664480998.1@sss.pgh.pa.us> Date: Thu, 29 Sep 2022 15:49:58 -0400 Message-ID: <346263.1664480998@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > According to the connection I am using, PQsslInUse is returning FALSE. > However, when I check the PQsslAttribute values, they are returning > "OpenSSL, NULL, NULL, NULL, NULL". In PostgreSQL 14, the library returns > NULL when the connection is not using OpenSSL. > It looks like commit ebc8b7d4416d8e0dfb7c05132ef6182fd3daf885 changed this > behavior. AFAICS that behavioral change is deliberate: for the single case of inquiring about "library", PQsslAttribute now tells you which SSL implementation libpq *can* use, not which one it's actually using on a given connection. I'm not sure that this is a great definition, since it's so unlike the behavior for other attributes. I can see the point of being able to check that, but should we have invented a new function instead of overloading PQsslAttribute this way? One concrete point against this is that should we ever be able to build libpq with the ability to use more than one GSS library, this API would be utterly broken. However, given that we're past rc1, I'm afraid that ship may have sailed. Assuming we leave it like this, how would you propose changing the documentation to make it more clear? regards, tom lane