> 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/