Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1icW2w-0000iF-R6 for pgsql-admin@arkaria.postgresql.org; Wed, 04 Dec 2019 14:54:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1icW2u-0003fb-CD for pgsql-admin@arkaria.postgresql.org; Wed, 04 Dec 2019 14:54:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1icW2t-0003dg-Nl for pgsql-admin@lists.postgresql.org; Wed, 04 Dec 2019 14:54:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1icW2m-0000qB-3W for pgsql-admin@lists.postgresql.org; Wed, 04 Dec 2019 14:54:25 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xB4EsAkN017948; Wed, 4 Dec 2019 09:54:10 -0500 From: Tom Lane To: Dave Hughes cc: pgsql-admin@lists.postgresql.org Subject: Re: tcp_keepalives settings not being set In-reply-to: References: Comments: In-reply-to Dave Hughes message dated "Wed, 04 Dec 2019 09:33:50 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <17946.1575471250.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Wed, 04 Dec 2019 09:54:10 -0500 Message-ID: <17947.1575471250@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Dave Hughes writes: > We have PostgreSQL 10.5 installed on RHEL 6 and I’m new to both. I’m in > the process of completing STIGs (Security Technical Implementation Guides) > for the Department of Defense. One of the STIGs mentions that we must > ensure our tcp_keepalives settings are configured in the postgresql.conf > file. I currently have these settings set to: > Tcp_keepalives_idle = 60 > Tcp_keepalives_interval = 60 > Tcp_keepalives_count = 2 > I restarted the database and then ran SHOW_ALL; but it showed all 3 > parameters set to 0. These will read as zeroes if you're using a non-TCP connection (ie Unix socket). Try it after "psql -h localhost" instead of just "psql". regards, tom lane