Re: pg_settings.pending_restart not set when line removed - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: pg_settings.pending_restart not set when line removed
Date
Msg-id 81D4BF11-BB3E-450B-B63C-B886D17881F4@yesql.se
Whole thread Raw
In response to pg_settings.pending_restart not set when line removed  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List 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/




pgsql-hackers by date:

Previous
From: Gilles Darold
Date:
Subject: Re: [PATCH] proposal for regexp_count, regexp_instr, regexp_substr and regexp_replace
Next
From: Fabien COELHO
Date:
Subject: Re: Some code cleanup for pgbench and pg_verifybackup