Re: pg_settings.pending_restart not set when line removed

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_settings.pending_restart not set when line removed
Date: 2021-07-27 09:45:03
Message-ID: 81D4BF11-BB3E-450B-B63C-B886D17881F4@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 27 Jul 2021, at 01:02, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2021-07-27 09:45:07 Re: Some code cleanup for pgbench and pg_verifybackup
Previous Message Gilles Darold 2021-07-27 09:38:36 Re: [PATCH] proposal for regexp_count, regexp_instr, regexp_substr and regexp_replace