Re: postgresql.auto.conf and reload

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: postgresql.auto.conf and reload
Дата
Msg-id CAA4eK1+SAVsr2-+ryt+EeWLt-itmtLh3YzWYvf-2-Wg_AXOi5A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: postgresql.auto.conf and reload  (Christoph Berg <cb@df7cb.de>)
Список pgsql-hackers
On Sun, Jul 6, 2014 at 1:57 PM, Christoph Berg <cb@df7cb.de> wrote:
> Re: Amit Kapila 2014-07-06 <CAA4eK1K=2WCD5ur8c-34NOw+XKg57Q4k0SajwSQXcwciD-=+0w@mail.gmail.com>
> > Another could be that during initdb all the uncommented settings be
> > written to postgresql.auto.conf file rather than to postgresql.conf.
> > I think we can do this by changing code in initdb.c->setup_config().
> > This will ensure that unless user is changing settings in a mixed way
> > (some by Alter System and some manually by editing postgresql.conf),
> > there will no such problem.
>
> That will make editing postgresql.conf totally useless, because users
> will always need to check if their new value isn't overridden by
> something in auto.conf. This will affect *all* users, as everyone
> needs to bump shared_buffers, which is set by initdb. We'd get 10^X
> complaints from admins who got confused where their config actually
> is.

Users/admins can always confirm that from pg_settings (sourcefile can
be used to find that out).

Another thing is that if user is using mixed way (Alter System and manually
editing postgresql.conf) to change the configuration parameters, then he
needs to be bit careful about setting the same parameter in both ways.
Example:
1. Default value of autovacuum_vacuum_cost_delay = 20
2. Edit postgresql.conf and change it to 30 
3. Perform Reload
4. Check the value by Show command, it will be 30
5. Alter System set autovacuum_vacuum_cost_delay =40
6. Perform Reload
7. Check the value by Show command, it will be 40
8. Alter System set autovacuum_vacuum_cost_delay = Default;
9  Perform Reload
10 Check the value by Show command, it will be 30 

In Step-10, ideally he can expect default value for parameter which
is 20, however the actual value will be 30 because of editing done in
Step-2.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: wrapping in extended mode doesn't work well with default pager
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: 9.4 documentation: duplicate paragraph in logical decoding example