ALTER SYSTEM for tcp_keepalives_idle doesn't show up with the SHOW command.

From: "Robertson, Alan L" <Alan(dot)Robertson(at)charter(dot)com>
To: Postgres Bug <pgsql-bugs(at)postgresql(dot)org>
Subject: ALTER SYSTEM for tcp_keepalives_idle doesn't show up with the SHOW command.
Date: 2017-12-22 16:18:09
Message-ID: 1513959489455.36489@charter.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Dear Postgres Bug list,

I read about the ALTER SYSTEM command at https://www.postgresql.org/docs/9.6/static/sql-altersystem.html and an article at
http://paquier.xyz/postgresql-2/postgres-9-4-feature-highlight-alter-system-set-for-dynamic-configuration/

and his example worked exactly as it should. However, when I tried with tcp_keepalives_idle, updates the auto.conf file as it should, but does not show up in the SHOW command... I tried it with the value 60, or '60' - didn't seem to make any difference...

postgres=# ALTER SYSTEM SET work_mem TO '10MB';
ALTER SYSTEM
postgres=# SELECT pg_reload_conf();
pg_reload_conf
----------------
t
(1 row)
postgres=# SHOW work_mem;
work_mem
----------
10MB
(1 row)

postgres=# ALTER SYSTEM SET tcp_keepalives_idle='60';
ALTER SYSTEM
postgres=# SELECT pg_reload_conf();
pg_reload_conf
----------------
t
(1 row)

postgres=# SHOW tcp_keepalives_idle;
tcp_keepalives_idle
---------------------
0
(1 row)

$ sudo cat /var/lib/postgresql/9.5/main/postgresql.auto.conf
# Do not edit this file manually!
# It will be overwritten by ALTER SYSTEM command.
tcp_keepalives_idle = '60'
work_mem = '10MB'

$ sudo -u postgres psql
psql (9.5.10)
Type "help" for help.
postgres=# SHOW work_mem;
work_mem
----------
10MB
(1 row)
postgres=# SHOW tcp_keepalives_idle;
tcp_keepalives_idle
---------------------
0
(1 row)

So, which is not working - reading from the config file, or showing the correct value?

I get the same value (0) even when I hack the main postgresql.conf file. It still shows zero. I even restarted the service - makes no difference.

-- Alan Robertson
alan(dot)robertson(at)charter(dot)com

E-MAIL CONFIDENTIALITY NOTICE:
The contents of this e-mail message and any attachments are intended solely for the addressee(s) and may contain confidential and/or legally privileged information. If you are not the intended recipient of this message or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message and any attachments. If you are not the intended recipient, you are notified that any use, dissemination, distribution, copying, or storage of this message or any attachment is strictly prohibited.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-12-22 17:20:09 Re: ALTER SYSTEM for tcp_keepalives_idle doesn't show up with the SHOW command.
Previous Message Sergei Kornilov 2017-12-22 13:04:34 Re: May be a jsonb type bug