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 1p5ViA-0004lz-Vk for pgsql-general@arkaria.postgresql.org; Wed, 14 Dec 2022 17:38:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p5Vi9-0002YY-Tt for pgsql-general@arkaria.postgresql.org; Wed, 14 Dec 2022 17:38:29 +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 1p5Vi9-0002YP-JX for pgsql-general@lists.postgresql.org; Wed, 14 Dec 2022 17:38:29 +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 1p5Vi7-0003YL-AQ for pgsql-general@lists.postgresql.org; Wed, 14 Dec 2022 17:38:29 +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 2BEHcOAu2707300; Wed, 14 Dec 2022 12:38:24 -0500 From: Tom Lane To: Willy-Bas Loos cc: Laurenz Albe , pgsql-general Subject: Re: tcp keepalives not sent during long query In-reply-to: References: Comments: In-reply-to Willy-Bas Loos message dated "Wed, 14 Dec 2022 18:00:18 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2707298.1671039504.1@sss.pgh.pa.us> Date: Wed, 14 Dec 2022 12:38:24 -0500 Message-ID: <2707299.1671039504@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Willy-Bas Loos writes: > Thanks for your answer. I was afraid someone would say that... > I was hoping that the keepalives would be more of a matter of cooperation > between postgres and the OS. No, we just apply the setting to the open socket and trust the OS to do it. Are you quite certain that you applied the configuration change to your new installation? It'd be worth doing show tcp_keepalives_idle; in one of the sessions where you are having trouble. And maybe check the other keepalives settings too? regards, tom lane