Dear Postgres Bug list,
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.robertson@charter.com
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.