Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
От | Amit Kapila |
---|---|
Тема | Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review]) |
Дата | |
Msg-id | CAA4eK1KTQe=XOisc53sp-q9Wd3sJAipf5rJrxz0S+K0E0_7mFQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review]) (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: ALTER SYSTEM SET command to change postgresql.conf parameters
(RE: Proposal for Allow postgresql.conf values to be changed via
SQL [review])
|
Список | pgsql-hackers |
On Wed, Aug 21, 2013 at 8:22 PM, Stephen Frost <sfrost@snowman.net> wrote: > Martijn, > > * Martijn van Oosterhout (kleptog@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, wecan 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 checkthis variable and return error (not > allowed), if this parameter is off. > 3. Now if user enables include directivein postgresql.conf, it will > enable Alter System as value of enable_alter_system is on. > 4. User can run AlterSystem 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
В списке pgsql-hackers по дате отправления: