Re: Permanent settings

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Csaba Nagy <nagy(at)ecircle-ag(dot)com>, Aidan Van Dyk <aidan(at)highrise(dot)ca>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Permanent settings
Date: 2008-02-19 19:18:44
Message-ID: 20080219191844.GB17284@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 19, 2008 at 04:58:21PM +0000, Gregory Stark wrote:
> "Magnus Hagander" <magnus(at)hagander(dot)net> writes:
>
> > Yeah, that may actually be a very good way to implement it. I don't like
> > the idea of continously appending to an existing file, but if we did have a
> > separate file with a tightly controlled format that would be doable.
>
> +1
>
> Separating the automatically written configuration and the explicit user
> configuration is definitely the right approach. My experience comes from
> Debian where packages editing their own configuration files is verboten.
> Otherwise you run into problems reconciling user-made changes and automatic
> changes.
>
> The include file method is workable but isn't perfect. What happens if a user
> connects with pgadmin and changes a parameter but that parameter is overridden
> by a variable in the config file?

Um, if you put the include statement at the bottom, isn't that the one that
will override?

> The alternative is to have two files and read them both. Then if you change a
> variable which is overridden by the other source you can warn that the change
> is ineffective.

Ok, now I don't follow. If we use an include, we do have two files, and we
read them both, no?

> I think on balance the include file method is so much simpler that I prefer it.

Yeah, that is one very clear argument for that method.

Since there have been no major protests, I assume that if I can come up
with reasonably pretty code without opening up any horrible holes, going
by the include method is the way to go?

//Magnus

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2008-02-19 19:32:22 Re: Permanent settings
Previous Message Magnus Hagander 2008-02-19 19:16:22 Re: Permanent settings