Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUEDN-00065C-EJ for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Dec 2017 16:05:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUEDM-0004w8-NX for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Dec 2017 16:05:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eUEDM-0004vx-I7 for pgsql-bugs@lists.postgresql.org; Wed, 27 Dec 2017 16:05:56 +0000 Received: from xvm-110-146.dc2.ghst.net ([46.226.110.146] helo=fetter.org) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eUEDE-0007C9-SX for pgsql-bugs@postgresql.org; Wed, 27 Dec 2017 16:05:56 +0000 Received: by fetter.org (Postfix, from userid 1001) id F0EE941973; Wed, 27 Dec 2017 17:05:45 +0100 (CET) Date: Wed, 27 Dec 2017 17:05:45 +0100 From: David Fetter To: Amit Kapila Cc: "Robertson, Alan L" , Tom Lane , Postgres Bug Subject: Re: ALTER SYSTEM for tcp_keepalives_idle doesn't show up with the SHOW command. Message-ID: <20171227160545.GC32234@fetter.org> References: <1513959489455.36489@charter.com> <17247.1513963209@sss.pgh.pa.us> <1513964805505.77792@charter.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sat, Dec 23, 2017 at 09:34:27AM +0530, Amit Kapila wrote: > On Fri, Dec 22, 2017 at 11:16 PM, Robertson, Alan L > wrote: > > Is this described in the documentation somewhere? > > Yes. See the documentation of the parameter tcp_keepalives_idle [1]. > It clearly documents the behavior, "In sessions connected via a > Unix-domain socket, this parameter is ignored and always reads as > zero". > > https://www.postgresql.org/docs/devel/static/runtime-config-connection.html So the behavior is documented, which is better than leaving it undocumented, kinda. The following hack works for me. Apart from being ugly, it's fundamentally unsatisfactory because the question of whether the setting has been activated is left unsettled: SELECT (regexp_match( pg_read_file( 'postgresql.auto.conf'), $$tcp_keepalives_idle = '([[:digit:]]+)$$ ) )[1] AS "tcp_keepalives_idle"; tcp_keepalives_idle --------------------- 60 (1 row) It might be possible to infer the state of activation by riffling through the logs with similar hackery, but it's tricky to ensure that the answer you get is current. Is it worthwhile to reconsider the decision not to expose the currently active setting of this parameter via UNIX sockets? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate