Re: Merging postgresql.conf and postgresql.auto.conf - Mailing list pgsql-hackers

From Sawada Masahiko
Subject Re: Merging postgresql.conf and postgresql.auto.conf
Date
Msg-id CAD21AoD+nvdG+9pfammbKQMKxjidwwKb+bg9Zs_=4C8J9FHX4A@mail.gmail.com
Whole thread Raw
In response to Re: Merging postgresql.conf and postgresql.auto.conf  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Merging postgresql.conf and postgresql.auto.conf
Re: Merging postgresql.conf and postgresql.auto.conf
List pgsql-hackers
On Thu, Jan 15, 2015 at 12:37 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Sawada Masahiko <sawada.mshk@gmail.com> writes:
>> The postgresql.auto.conf is loaded after loading of postgresql.conf
>> whenever configuration file is loaded or reloaded.
>> This means that parameter in postgresql.auto.conf is quite high
>> priority, so the parameter in postgresql.conf does not work at all
>> even if user set it manually.
>
>> If user want to change stopped postgresql server then user need to
>> merge two configuration file(postgresql.conf and postgresql.auto.conf)
>> while maintaining the consistency manually.
>
>>> From an operational perspective having a written config with duplicate
>> entries is not good thing.
>> I think we need to merge two configuration file into one (or more than
>> one, if it uses like 'include' word)
>
>> The one solution is to add merging tool/commnand which merges two
>> configuration file while maintaining the consistency.
>> This topic have been already discussed?
>
> Yes.  The entire reason that postgresql.auto.conf is separate is that
> we despaired of reading and rewriting postgresql.conf automatically
> without making a hash of material in the comments.  Calling the logic
> a "merge tool" does not make that problem go away.
>

The merge tool do not only to merge the all parameters in two
configuration into one file but also to remove duplicate parameters.
That is, the configuration files will be one file in logically.

It will be clearly complicated work that the user need to rewrite
postgresql.conf manually while maintaining the consistency.
(On top of that, The executing of ALTER SYSTEM command is not allowed
user except super user.)

Is it bad that ALTER SYSTEM parses postgresql.conf again at
AlterSystemSetConfigFile() to get line number and file name of that
parameter?
(or postgresql continue to keep line number and file name of parameter)


Regards,

-------
Sawada Masahiko



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Minor configure tweak to simplify adjusting gcc warnings
Next
From: Andres Freund
Date:
Subject: Re: Minor configure tweak to simplify adjusting gcc warnings