Re: Possibility to disable `ALTER SYSTEM`
David G. Johnston <david.g.johnston@gmail.com>
From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>, Tom Lane <tgl@sss.pgh.pa.us>, Magnus Hagander <magnus@hagander.net>, Robert Haas <robertmhaas@gmail.com>, Martín Marqués <martin.marques@gmail.com>, Isaac Morland <isaac.morland@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2024-02-06T14:38:06Z
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 →
-
Add allow_alter_system GUC.
- d3ae2a24f265 17.0 landed
-
Rename COMPAT_OPTIONS_CLIENT to COMPAT_OPTIONS_OTHER.
- de7e96bd0fc6 17.0 landed
-
Remove support for version-0 calling conventions.
- 5ded4bd21403 10.0 cited
On Tue, Feb 6, 2024 at 7:10 AM Peter Eisentraut <peter@eisentraut.org> wrote: > > How about ALTER SYSTEM is disabled if the file > postgresql.auto.conf.disabled exists? This is somewhat similar to making > the file read-only, but doesn't risk other tools breaking when they > encounter such a file. And it's more obvious and self-explaining. > A separate configuration file would be self-documenting and able to always exist; the same properties as postgres.conf ISTM the main requirement regardless of how the file system API is designed - assuming there is a filesystem API - is that the running postgres process be unable to write to the file. It seems immaterial how the OS admin accomplishes that goal. The command line argument method seems appealing but it seems harder in that case to ensure that the postgres process be disallowed from modifyIng whatever file defines what should be run. One concern with a file configuration is that if we require it to be present in the data directory that goes somewhat against the design of allowing configuration files to be placed anywhere by changing the config_file guc. Any design should factor in the almost immediate need to be extended to prevent copy variants that touch the local filesystem or shell directly. I was pondering a directory in pgdata where you could add *.disabled files indicating which features to disable. This is a bit more pluggable than a single configuration file but the later still seems better to me. David J.