Re: pg_settings.pending_restart not set when line removed
Alexander Kukushkin <cyberdemn@gmail.com>
From: Alexander Kukushkin <cyberdemn@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-08-13T14:30:39Z
Lists: pgsql-hackers
Hi Alvaro,
On Tue, 27 Jul 2021 at 22:17, Alvaro Herrera <alvherre@alvh.no-ip.org>
wrote:
> I tested this -- it works correctly AFAICS.
>
Nope, IMO it doesn't work correctly.
Lets say we have recovery_target = '' in the config:
localhost/postgres=# select name, setting, setting is null, pending_restart
from pg_settings where name = 'recovery_target';
name │ setting │ ?column? │ pending_restart
─────────────────┼─────────┼──────────┼─────────────────
recovery_target │ │ f │ f
(1 row)
After that we remove it from the config and call pg_ctl reload. It sets the
panding_restart.
localhost/postgres=# select name, setting, setting is null, pending_restart
from pg_settings where name = 'recovery_target';
name │ setting │ ?column? │ pending_restart
─────────────────┼─────────┼──────────┼─────────────────
recovery_target │ │ f │ t
(1 row)
IMO is totally wrong, because the actual value didn't change: it was an
empty string in the config and now it remains an empty string due to the
default value in the guc.c
Regards,
--
Alexander Kukushkin
Commits
-
Set pg_setting.pending_restart when pertinent config lines are removed
- ddd1eac99369 11.13 landed
- b8f91d7f9263 13.4 landed
- ad3b40eb26a3 14.0 landed
- 93a0bf239032 15.0 landed
- 85ec6c322650 9.6.23 landed
- 6feb229f53f8 12.8 landed
- 04fa0e11ac20 10.18 landed