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 20:17:28
Message-ID: 202107272017.rueagj54fhmt@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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".

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2021-07-27 20:20:34 Re: Showing applied extended statistics in explain
Previous Message Tom Lane 2021-07-27 20:01:54 Re: Have I found an interval arithmetic bug?