Re: pg_settings.pending_restart not set when line removed
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-27T09:45:03Z
Lists: pgsql-hackers
> On 27 Jul 2021, at 01:02, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > I tried the attached patch, which sets GUC_PENDING_RESTART if we're > doing pg_file_settings(). Then any subsequent read of pg_settings will > have the pending_restart flag set. This seems to work correctly, and > consistently with the case where you change a line (without removing it) > in unpatched master. LGTM after testing this with various changes and ways to reload, and +1 for being consistent with changing a line. > You could argue that this is *weird* (why does reading pg_file_settings > set a flag in global state?) ... but that weirdness is not something > this patch is introducing. Agreed. Another unrelated weird issue is that we claim that the config file "contains errors" if the context is < PGC_SIGHUP for restart required settings. It seems a bit misleading to call pending_restart an error since it implies (in my reading) there were syntax errors. But, unrelated to this patch and report (and it's been like that for a long time), just hadn't noticed that before. -- Daniel Gustafsson https://vmware.com/
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