You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background information: I have submitted a patch for PostgreSQL to disable ALTER SYSTEM at startup time. For more information and also the reason behind it, please refer to the thread in the pgsql-hackers mailing list below:
If ever, this patch will not land in PostgreSQL before version 17. There are chances though that it will never land.
In the meantime, it would be good to introduce a workaround for all currently available Postgres versions, including the upcoming 16. Add a new option in the cluster's spec called enableAlterSystem with a current default value of true for back-compatibility (in 1.22 we should make the default change to false).
The idea is that the postgresql.auto.conf file is made read-only. Add proper documentation too.
That makes sense, but I am worried about current users who rely on it. We can't just simply disable it from dusk to dawn. I propose that for 1.21 (so v1 of the API) we add the enableAlterSystem option and set it to false by default (with proper warning message for those who update). And then we remove it in v2.
Activity
leonardoce commentedon Sep 11, 2023
I'd disable
ALTER SYSTEMin CNPG. I can't imagine a case where this should be used when the cluster is working.I understand this would be useful to fix a broken cluster, but in this case, the user could:
postgres.conffile as neededBy doing this the user will have total control over the GUCs, and over where/which configuration file we include.
gbartolini commentedon Sep 11, 2023
That makes sense, but I am worried about current users who rely on it. We can't just simply disable it from dusk to dawn. I propose that for 1.21 (so v1 of the API) we add the
enableAlterSystemoption and set it tofalseby default (with proper warning message for those who update). And then we remove it in v2.feat: allow users to disable ALTER SYSTEM (#3535)
feat: allow users to disable ALTER SYSTEM (#3535)
feat: allow users to disable ALTER SYSTEM (#3535)