On Sun, Jul 6, 2014 at 1:57 PM, Christoph Berg <c...@df7cb.de> wrote:
> Re: Amit Kapila 2014-07-06
> > 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
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.
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