pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Fetter <david@fetter.org>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Robertson, Alan L <Alan.Robertson@charter.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Postgres Bug <pgsql-bugs@postgresql.org>
Subject: Re: ALTER SYSTEM for tcp_keepalives_idle doesn't show up with the SHOW command.
Date: Wed, 27 Dec 2017 17:05:45 +0100
Message-ID: <20171227160545.GC32234@fetter.org> (raw)
In-Reply-To: <CAA4eK1+s8+-8Y9y_xKTVE4hrBn=b5QZAb_fOvsR+9H6_HjkXjw@mail.gmail.com>
References: <1513959489455.36489@charter.com>
	<17247.1513963209@sss.pgh.pa.us>
	<1513964805505.77792@charter.com>
	<CAA4eK1+s8+-8Y9y_xKTVE4hrBn=b5QZAb_fOvsR+9H6_HjkXjw@mail.gmail.com>

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
> <Alan.Robertson@charter.com> 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 <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate




view thread (13+ messages)  latest in thread

Message-ID: <20171227160545.GC32234@fetter.org>
Permalink:  ../20171227160545.GC32234@fetter.org/
Also on:    postgresql.org/message-id/20171227160545.GC32234@fetter.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: david@fetter.org, amit.kapila16@gmail.com, Alan.Robertson@charter.com, tgl@sss.pgh.pa.us
  Subject: Re: ALTER SYSTEM for tcp_keepalives_idle doesn't show up with the SHOW command.
  In-Reply-To: <20171227160545.GC32234@fetter.org>
  References: <1513959489455.36489@charter.com> <17247.1513963209@sss.pgh.pa.us> <1513964805505.77792@charter.com> <CAA4eK1+s8+-8Y9y_xKTVE4hrBn=b5QZAb_fOvsR+9H6_HjkXjw@mail.gmail.com> <20171227160545.GC32234@fetter.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox