On Wed, Aug 21, 2013 at 8:22 PM, Stephen Frost <sfr...@snowman.net> wrote: > Martijn, > > * Martijn van Oosterhout (klep...@svana.org) wrote: >> ISTM you want some kind of hybrid setting like: >> >> #include_system auto.conf >> >> which simultaneously does three things: >> >> 1. Sets the enable_alter_system flag >> 2. Indicates the file to use >> 3. Indicates the priority of the setting re other settings. >> >> Comment it out, ALTER SYSTEM stop working. Put it back and it's >> immediately clear what it means. And the user can control where the >> settings go. > > Yeah, that's certainly an interesting idea. I might call it > 'auto_conf_file auto.conf' to avoid the '#include' concern and to > perhaps clarify that it's more than just a regular 'include'.
This can resolve the problem of whether to read auto file rather cleanly, so the idea is: Enable/Disable reading of auto file ----------------------------------------------------- a. Have a new include in postresql.conf #include_auto_conf_file postgresql.auto.conf as it is a special include, we can read this file relative to data directory. Enable/Disable Alter System command ----------------------------------------------------------- This can be achieved in 3 ways: a. Check before executing Alter System if include directive is disabled, then just issue a warning to user and proceed with command. b. Check before executing Alter System if include directive is disabled, then just issue an error and stop. c. Have a new guc enable_alter_system which will behave as described in my previous mail and below: >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. With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers