Stephen Frost escribió: > * Amit Kapila (amit.kapil...@gmail.com) wrote: > > So let me try to explain what I understood from above: > > > > 1. enable_alter_system a new GUC whose default value =off. > > 2. Alter System will check this variable and return error (not > > allowed), if this parameter is off. > > 3. Now if user enables include directive in postgresql.conf, it will > > enable Alter System as value of > > enable_alter_system is on. > > 4. User can run Alter System command to disable Alter System > > "enable_alter_system = off". > > Now even though include directive is enabled, but new Alter System > > commands will not work, however > > existing parameter's take into effect on restart/sighup. > > Yes. Not sure that it'd be terribly likely for a user to do that, but > if they do it, so be it.
With this design, if you put enable_alter_system=off in auto.conf, there is no way for the user to enable alter system again short of editing a file in the data directory. I think this is one of the things that was "forbidden" by policy; only files in the config directory needs to be edited. What I was proposing upthread is that enable_alter_system=off/on would be present in postgresql.conf, and there is no include line for auto.conf. That way, if the user wishes to enable/disable the feature, they need to edit postgresql.conf to do so. ALTER SYSTEM doesn't offer a way to disable itself. If ALTER SYSTEM is disabled via enable_alter_system=off in postgresql.conf, the settings in auto.conf are not read. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers