Re: Possibility to disable `ALTER SYSTEM`

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Joel Jacobson <joel(at)compiler(dot)org>, Gabriele Bartolini <gabriele(dot)bartolini(at)enterprisedb(dot)com>, Magnus Hagander <magnus(dot)hagander(at)redpill-linpro(dot)com>, Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>
Subject: Re: Possibility to disable `ALTER SYSTEM`
Date: 2024-03-27 15:50:27
Message-ID: CAGECzQQgKOybQyio4Uij8zmzK9mes0_aU1ZRoMxBf8YbH-QFwA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 27 Mar 2024 at 16:10, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Wed, Mar 27, 2024 at 11:01 AM Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > Uh, the above is clearly wrong. I think you mean "off" on the second line.
>
> Woops. When the name changed from externally_managed_configuration to
> allow_alter_system, the sense of it was reversed, and I guess Jelte
> missed flipping the documentation references around.

Yeah, that's definitely what happened. I did change a few, but I
indeed missed a few others (or maybe flipped some twice by accident,
or hadn't been flipped before when it reversed previously).

> > Why "remotely"?
>
> This wording was suggested upthread. I think the point here is that if
> the superuser is logging in from the local machine, it's obvious that
> they can do whatever they want. The point is to emphasize that a
> superuser without a local login can, too.

Changed this from "remotely using other means" to "using other SQL commands".

> > "its"?
>
> Yeah, that seems like an extra word.

Changed this to "the configuration of PostgreSQL"

> > > + some outside mechanism. In such environments, using <command>ALTER
> > > + SYSTEM</command> to make configuration changes might appear to work,
> > > + but then may be discarded at some point in the future when that outside
> >
> > "might"
>
> This does not seem like a mistake to me. I'm not sure why you think it is.

I also think the original sentence was correct, but I don't think it
read very naturally. Changed it now in hopes to improve that.

> > > + mechanism updates the configuration. Setting this parameter to
> > > + <literal>on</literal> can help to avoid such mistakes.
> > > + </para>
> >
> > "off"
>
> This is another case that needs to be fixed now that the sense of the
> GUC is reversed. (We'd better make sure the code has the test the
> right way around, too.)

Fixed this one too, and the code is the right way around.

Attachment Content-Type Size
v8-0001-Rename-COMPAT_OPTIONS_CLIENT-to-COMPAT_OPTIONS_OT.patch application/octet-stream 2.4 KB
v8-0002-Add-allow_alter_system-GUC.patch application/octet-stream 6.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Regina Obe 2024-03-27 15:50:55 Can't compile PG 17 (master) from git under Msys2 autoconf
Previous Message Alvaro Herrera 2024-03-27 15:34:57 Re: [EXTERNAL] Re: Add non-blocking version of PQcancel