Re: Possibility to disable `ALTER SYSTEM`

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Martín Marqués <martin(dot)marques(at)gmail(dot)com>, Isaac Morland <isaac(dot)morland(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Gabriele Bartolini <gabriele(dot)bartolini(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Possibility to disable `ALTER SYSTEM`
Date: 2024-02-01 15:27:56
Message-ID: CA+Tgmob=df1Dv4toeikgU9NfHOnnbD8iSsGDcZ_MtR7Te+NCig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 1, 2024 at 7:33 AM Bruce Momjian <bruce(at)momjian(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2024-02-01 15:35:15 Re: Request for comment on setting binary format output per session
Previous Message vignesh C 2024-02-01 15:25:22 Re: Collation version tracking for macOS