Re: pg_settings.pending_restart not set when line removed
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-27T20:17:28Z
Lists: pgsql-hackers
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".
Commits
-
Set pg_setting.pending_restart when pertinent config lines are removed
- ddd1eac99369 11.13 landed
- b8f91d7f9263 13.4 landed
- ad3b40eb26a3 14.0 landed
- 93a0bf239032 15.0 landed
- 85ec6c322650 9.6.23 landed
- 6feb229f53f8 12.8 landed
- 04fa0e11ac20 10.18 landed