Re: Possibility to disable `ALTER SYSTEM` - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Possibility to disable `ALTER SYSTEM`
Date
Msg-id CA+Tgmob=df1Dv4toeikgU9NfHOnnbD8iSsGDcZ_MtR7Te+NCig@mail.gmail.com
Whole thread Raw
In response to Re: Possibility to disable `ALTER SYSTEM`  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Thu, Feb 1, 2024 at 7:33 AM Bruce Momjian <bruce@momjian.us> wrote:
> On Tue, Jan 30, 2024 at 04:25:12PM -0500, Robert Haas wrote:
> > I don't think we should pretend like one of the two paragraphs above
> > is valid and the other is hot garbage. That's not solving anything. We
> > can't resolve the tension between those two things in either direction
> > by somebody hammering on the side of the argument that they believe to
> > be correct and ignoring the other one.
>
> What if we generate log messages when certain commands are used, like
> ALTER TABLE?  We could have GUC which controls which commands are
> logged.

Well, as I understand it, that doesn't solve the problem here. The
problem some people want to solve here seems to be:

On my system, the PostgreSQL configuration parameters are being
managed by $EXTERNAL_TOOL. Therefore, they should not be managed by
PostgreSQL itself. Therefore, if someone uses ALTER SYSTEM, they've
made a mistake, so we should give them an ERROR telling them that,
like:

ERROR: you're supposed to update the configuration via k8s, not ALTER
SYSTEM, you dummy!
DETAIL: Stop being an idiot.

The exact message text might need some wordsmithing. :-)

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Collation version tracking for macOS
Next
From: vignesh C
Date:
Subject: Re: Request for comment on setting binary format output per session