Re: postgresql.auto.conf and reload

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgresql.auto.conf and reload
Date: 2014-07-09 03:18:39
Message-ID: CAA4eK1KrdqW_hmubGv+fVTyqGZamF197a6UsnxMjZKtqzrAAjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 9, 2014 at 6:40 AM, Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
wrote:
> On 09/07/14 05:13, Josh Berkus wrote:
>>> 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.
>>
>>
>> There is no reasonable way for us to prevent issues for users who are
>> manually changing both pg.conf and pg.auto.conf. Users should stick to
>> one or the other method of management (or, thirdly, using conf.d); if
>> they mix methods, we can't prevent confusion at restart time and we
>> shouldn't try.
>
> Yes, but even well behaved users will see this type of error, because
initdb uncomments certain values (ones that are dead certs for being
changed via ALTER SYSTEM subsequently like shared_buffers), and then -
bang! your next reload gets that "your postgresql.conf contains errors"
message.

That is the reason, why I have suggested up-thread that uncommented
values should go to postgresql.auto.conf, that will avoid any such
observations for a well-behaved user.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-07-09 04:44:32 Re: postgresql.auto.conf and reload
Previous Message Amit Kapila 2014-07-09 03:13:49 Re: postgresql.auto.conf and reload