Re: Possibility to disable `ALTER SYSTEM`

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Magnus Hagander <magnus@hagander.net>
Cc: Robert Haas <robertmhaas@gmail.com>, Jelte Fennema-Nio <postgres@jeltef.nl>, Bruce Momjian <bruce@momjian.us>, Maciek Sakrejda <m.sakrejda@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Joel Jacobson <joel@compiler.org>, Andrew Dunstan <andrew@dunslane.net>, Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-03-18T15:44:20Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add allow_alter_system GUC.

  2. Rename COMPAT_OPTIONS_CLIENT to COMPAT_OPTIONS_OTHER.

  3. Remove support for version-0 calling conventions.

> On 18 Mar 2024, at 16:34, Magnus Hagander <magnus@hagander.net> wrote:
> 
> On Mon, Mar 18, 2024 at 2:09 PM Daniel Gustafsson <daniel@yesql.se> wrote:
>> 
>>> On 18 Mar 2024, at 13:57, Robert Haas <robertmhaas@gmail.com> wrote:
>> 
>>> my proposal is something like this, taking a
>>> bunch of text from Jelte's patch and some inspiration from Magnus's
>>> earlier remarks:
>> 
>> I still think any wording should clearly mention that settings in the file are
>> still applied.  The proposed wording says to implicitly but to avoid confusion
>> I think it should be explicit.
> 
> I haven't kept up with the thread, but in general I'd prefer it to
> actually turn off parsing the file as well. I think just turning off
> the ability to change it -- including the ability to *revert* changes
> that were made to it before -- is going to be confusing.

Wouldn't that break pgBackrest which IIRC write to .auto.conf directly
without using ALTER SYSTEM?

> But, if we have decided it shouldn't do that, then IMHO we should
> consider naming it maybe enable_alter_system_command instead -- since
> we're only disabling the alter system command, not the actual feature
> in total.

Good point.

--
Daniel Gustafsson