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 1rKhc6-0046LT-PF for pgsql-admin@arkaria.postgresql.org; Tue, 02 Jan 2024 16:27:34 +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 1rKhc5-00HFgV-AC for pgsql-admin@arkaria.postgresql.org; Tue, 02 Jan 2024 16:27:33 +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 1rKhc4-00HFgN-Ux for pgsql-admin@lists.postgresql.org; Tue, 02 Jan 2024 16:27:32 +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 1rKhc2-00FBBw-JW for pgsql-admin@lists.postgresql.org; Tue, 02 Jan 2024 16:27:32 +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 402GRQrV4096248; Tue, 2 Jan 2024 11:27:26 -0500 From: Tom Lane To: Thomas Kellerer cc: pgsql-admin@lists.postgresql.org Subject: Re: PostgreSQL local connection is taking 4 seconds In-reply-to: <006c932a-d986-d0d1-61cd-065ffbe71fb3@gmx.net> References: <006c932a-d986-d0d1-61cd-065ffbe71fb3@gmx.net> Comments: In-reply-to Thomas Kellerer message dated "Tue, 02 Jan 2024 16:55:00 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <4096246.1704212846.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 02 Jan 2024 11:27:26 -0500 Message-ID: <4096247.1704212846@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Kellerer writes: > pramod kg schrieb am 02.01.2024 um 14:58: >> We have upgraded the OS from RHEL7 to RHEL8 in our testbed machines. Af= ter upgrading, PostgrSQL=C2=A0local connection is taking ~4 seconds (Both = TLS and non TLS connection). Please advise on what to be verified? There i= s no change in postgresql.conf or pg_hba.conf. > Did you enable log_hostname? > That does a revers DNS lookup which could be a reason for the connection= suddenly taking longer. Even without log_hostname, it could be a slow-DNS-lookup problem. Rather than guessing, though, it might be time to try strace'ing the psql session to see what it's waiting for. regards, tom lane