From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pg_settings.pending_restart not set when line removed
Date: Tue, 27 Jul 2021 16:17:28 -0400
Message-ID: <202107272017.rueagj54fhmt@alvherre.pgsql> (raw)
In-Reply-To: <273674.1627398036@sss.pgh.pa.us>
On 2021-Jul-27, Tom Lane wrote:
> So maybe like
>
> if (gconf->context < PGC_SIGHUP)
> {
> + /* The removal can't be effective without a restart */
> + gconf->status |= GUC_PENDING_RESTART;
> ereport(elevel,
> (errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
Thanks, done that way.
> One thing worth checking is whether the pending-restart flag
> gets cleared again if the DBA undoes the removal and again
> reloads. I think the right thing will happen, but it'd be
> worthwhile to check.
I tested this -- it works correctly AFAICS.
Thanks!
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
Al principio era UNIX, y UNIX habló y dijo: "Hello world\n".
No dijo "Hello New Jersey\n", ni "Hello USA\n".
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
Subject: Re: pg_settings.pending_restart not set when line removed
In-Reply-To: <202107272017.rueagj54fhmt@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox