Re: Merging postgresql.conf and postgresql.auto.conf

From: Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk>
To: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Merging postgresql.conf and postgresql.auto.conf
Date: 2015-01-14 17:01:44
Message-ID: 1690040432.1146006.1421254904644.JavaMail.yahoo@jws11144.mail.ir2.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

----- Original Message -----

> From: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>
> To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
> Sent: Wednesday, 14 January 2015, 16:09
> Subject: Re: [HACKERS] Merging postgresql.conf and postgresql.auto.conf
>
> On Thu, Jan 15, 2015 at 12:37 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)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.

I think the point is that you can't really interpret the context of comments with an automated tool, so you'd probably construct a misleading conf file. I created something to mash conf files together in perl, but mash them together is all it does: https://github.com/glynastill/pg_upgrade_conf

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-01-14 17:07:01 Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)
Previous Message Robert Haas 2015-01-14 16:47:15 Re: Compression of full-page-writes