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-16 16:25:58 |
Message-ID: | CAD21AoCp731K87FRpN6pn9nDqZjZFJqx2SiL3byaSYS9YzTKcA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 16, 2015 at 12:54 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Thu, Jan 15, 2015 at 9:48 PM, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>
> wrote:
>> On Thu, Jan 15, 2015 at 2:02 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
>> wrote:
>> >
>> > 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.
>>
>
> Yeah that could be a possibility, but I think that will break the existing
> command('s) as this is the common infrastructure used for SHOW ..
> commands as well which displays the guc value that is used by
> current session rather than the value in postgresql.conf.
You're right.
pg_setting and SHOW command use value in current session rather than
config file.
It might break these common infrastructure.
>
> I don't know how appealing it would be to others, but a new view
> like pg_file_settings which would display the settings in file could
> be meaningful for your need.
>
> Another way is user can do pg_reload_conf() to see the latest
> values (excluding values for server startup time parameters).
>
I prefer the former. Because the latter would not handle all guc
variables as you said.
The new view like pg_file_setting has guc variable and config file
which has corresponding guc variable.
It would be helpful view for like ALTER SYSTEM ... RESET and that
command might be beneficial feature for user who want to manage
configuration file manually, I would like to propose them.
Regards,
-------
Sawada Masahiko
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2015-01-16 16:28:45 | Re: Safe memory allocation functions |
Previous Message | Andres Freund | 2015-01-16 16:12:17 | Re: Safe memory allocation functions |