Going to agree with Robert Treat here about an extension being a great solution. I resisted posting earlier as I wanted to see how this all pans out, but I wrote a quick little POC extension some months ago that does the disabling and works well (and cannot be easily worked around).
On Mon, Mar 18, 2024 at 4:59 PM Robert Haas <robertmh...@gmail.com> wrote: > I think that all of this is true except for (c). I think we'd need a > new hook to make it work. > Seems we can just use ProcessUtility and: if (IsA(parsetree, AlterSystemStmt) { ereport(ERROR, ... When we know that a feature is > widely-needed, it's better to have one good implementation of it in > core than several perhaps not-so-good implementations out of core. > Meh, maybe. This one seems pretty dirt simple. Granted, I have expanded my original POC to allow *some* things to be changed by ALTER SYSTEM, but the original use case warrants a very small extension. That allows us to focus all of our efforts on that one implementation > instead of splitting them across several -- which is the whole selling > point of open source, really -- and it makes it easier for users who > want the feature to get access to it. > Well, yeah, but they have to wait until version 18 at best, while an extension can run on any current version and probably be pretty future-proof as well. Cheers, Greg