From: | Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Merging postgresql.conf and postgresql.auto.conf |
Date: | 2015-01-15 16:18:09 |
Message-ID: | CAD21AoBjj3biMbpe38UMzwJHkgFTEupvf2J=DkBPROS3OBfH+A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jan 15, 2015 at 2:02 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Wed, Jan 14, 2015 at 9:01 PM, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>
> wrote:
>>
>> Hi all,
>>
>> 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.
>>
>
> I think one way to currently do it is with the help of Alter System .. Reset
> command. Basically user can check via pg_settings, if the variable
> belongs to postgresql.auto.conf and he knows already a duplicate copy
> of same is available in postrgresql.conf and that is the value he want to
> use, then RESET command could be used to remove the setting from
> postgresql.auto.conf
>
It sounds convenient.
e.g., It can reset one variable using by like RESET command, and reset
all variable using by RESET ALL command
>> 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.
>
> If you want to think of some solution which can make the usage of Alter
> System more convenient, then we should think only in terms of change/
> remove the value in postgresql.auto.conf as that is the place where we
> have added values programatically.
>
> One thought I have in this line is that currently there doesn't seem to be
> a way to know if the setting has an entry both in postgresql.conf and
> postgresql.auto.conf, if we can have some way of knowing the same
> (pg_settings?), then it could be convenient for user to decide if the value
> in postgresql.auto.conf is useful or not and if it's not useful then use
> Alter System .. Reset command to remove the same from
> postgresql.auto.conf.
I think one way is that pg_settings has file name of variables, But
It would not affect to currently status of postgresql.conf
So we would need to parse postgresql.conf again at that time.
Regards,
-------
Sawada Masahiko
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2015-01-15 16:24:46 | Re: EvalPlanQual behaves oddly for FDW queries involving system columns |
Previous Message | Andres Freund | 2015-01-15 16:07:05 | Re: s_lock.h default definitions are rather confused |