Re: Permanent settings

From: Richard Huxton <dev(at)archonet(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Permanent settings
Date: 2008-02-19 16:00:44
Message-ID: 47BAFD2C.7000702@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander wrote:
> On Tue, Feb 19, 2008 at 03:53:11PM +0000, Richard Huxton wrote:
>> Magnus Hagander wrote:
>>> What I'd really like to see is something like a new keyword on the SET
>>> command, so you could to SET PERMANENT foo=bar, which would write the
>>> configuration back into postgresql.conf.
>>>
>>> I don't have a complete solution for how to actually implement it, so I'm
>>> just throwing out some ideas for comment.
>> Not sure if it's of interest, but you might want to look at the postfix
>> mailserver configuration setup and see if that translates to an API.
>>
>> postconf
>> lists the configuration settings (in alphabetical order)
>
> SELECT * FROM pg_settings
>
>> postconf -n
>> list non-default settings
>
> SELECT * FROM pg_settings WHERE NOT source='default'
>
>> postconf <setting>
>> display "setting = value"
>
> SHOW log_destination
>
>> postconf -e <setting> = <value>
>> edit the configuration file, changing that setting
>
> That's the one remaining :-)
>
>
>> The editing option replaces any existing version of that setting and
>> adds the new value at the end of the file.
>
> Eh, it cannot both replace it, and add it at the end of the file, can it?
> Does it replace it in-line, or does it remove the in-line entry and put the
> new one at the end? Or are you saying it edits in-line entries and appends
> new ones at the end?

Sorry,
- Edits existing lines.
- Adds new ones to end of file.
- Leaves blank lines, comments etc. alone

>> Having all the values at the end of the file works well, because for a
>> simple setup you don't need to change many settings and they don't
>> depend on order.
>
> Right. I don't think we have any settings that depend on order, do we?

That's what I was trying to think of - nothing came to mind.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aidan Van Dyk 2008-02-19 16:09:43 Re: Permanent settings
Previous Message Magnus Hagander 2008-02-19 15:55:40 Re: Permanent settings