Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rL3bF-005sRC-N5 for pgsql-admin@arkaria.postgresql.org; Wed, 03 Jan 2024 15:56:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rL3bE-006Dk0-8z for pgsql-admin@arkaria.postgresql.org; Wed, 03 Jan 2024 15:56:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rL3bD-006Djs-Tg for pgsql-admin@lists.postgresql.org; Wed, 03 Jan 2024 15:56:07 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rL3bB-00FMKd-1f for pgsql-admin@lists.postgresql.org; Wed, 03 Jan 2024 15:56:07 +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 403Fu0Ma202848; Wed, 3 Jan 2024 10:56:00 -0500 From: Tom Lane To: pramod kg cc: Thomas Kellerer , pgsql-admin@lists.postgresql.org Subject: Re: PostgreSQL local connection is taking 4 seconds In-reply-to: References: <006c932a-d986-d0d1-61cd-065ffbe71fb3@gmx.net> <4096247.1704212846@sss.pgh.pa.us> Comments: In-reply-to pramod kg message dated "Wed, 03 Jan 2024 12:35:21 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <202846.1704297360.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 03 Jan 2024 10:56:00 -0500 Message-ID: <202847.1704297360@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk pramod kg writes: > We have made some progress. GSSAPI authentication method is taking time > though we have not enabled the GSSAPI authentication method in postgres > (but the connection request is spending some time there). We continue > troubleshooting on why the GSSAPI authentication method is taking longer > time. For now we have exported the following ENV and local connections a= re > faster. > export PGGSSENCMODE=3D"disable" Ah, that rings a bell. After a bit of searching I found https://www.postgresql.org/message-id/flat/16897-2632c6541c9f8491%40postgr= esql.org which seems to describe exactly the same symptom. We never got a final answer from that person, but I continue to think that Postgres must have been trying to use GSSAPI authentication, suggesting that the server is being started in an environment where a GSSAPI server appears to be available. regards, tom lane