Re: pg_settings.pending_restart not set when line removed

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 14:29:32
Message-ID: 202107271429.4m5ngdum7f66@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Jul-27, Tom Lane wrote:

> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> > 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.
>
> Ugh. I think this patch is likely to create more problems than it fixes.

I doubt that; as I said, the code already behaves in exactly that way
for closely related operations, so this patch isn't doing anything new.
Note that that loop this code is modifying only applies to lines that
are removed from the config file.

> We should be looking to get rid of that flag, not make its behavior even
> more complex.

Are you proposing to remove the pending_restart column from pg_settings?
That seems a step backwards.

What I know is that the people behind management interfaces need some
way to know if changes to the config need a system restart. Now maybe
we want that feature to be implemented in a different way than it
currently is. I frankly don't care enough to do that myself. I agree
that the current mechanism is weird, but it's going to take more than a
one-liner to fix it. The one-liner is only intended to fix a very
specific problem.

--
Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/
"After a quick R of TFM, all I can say is HOLY CR** THAT IS COOL! PostgreSQL was
amazing when I first started using it at 7.2, and I'm continually astounded by
learning new features and techniques made available by the continuing work of
the development team."
Berend Tober, http://archives.postgresql.org/pgsql-hackers/2007-08/msg01009.php

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-07-27 14:33:21 Re: Reduce the number of special cases to build contrib modules on windows
Previous Message Isaac Morland 2021-07-27 14:23:54 Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)