Re: Parsing config files in a directory

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Greg Smith <gsmith(at)gregsmith(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parsing config files in a directory
Date: 2009-10-26 18:43:17
Message-ID: 1256582597.2389.1.camel@jd-desktop.unknown.charter.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2009-10-26 at 10:19 -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Maybe SET PERSISTENT needs to go back to postgresql.conf, add an
> > automatic comment "# overridden in persistent.conf" and put a comment
> > marker in front of the original line. That way the user is led to the
> > actual authoritative source.
>
> Doesn't that require the same AI-complete parsing ability we have said
> we don't want to implement?
>
> Personally I think this is just a matter of usage. If you want to use
> SET PERSISTENT, don't set values manually in postgresql.conf. How is
> that different from the existing rule that if you want to set values in
> postgresql.conf, you'd better not set them on the postmaster command
> line?
>
> > Fortunately we now have an easy way to find out which file is each
> > setting's value coming from.
>
> Yeah --- that feature should make it easy enough to debug any conflicts.
>
> I think we shouldn't overthink this. The separate file with a clear
> warning to not edit it manually seems like a fine approach from here.

+1

This is a very usual thing to do. You just have a warning that says,

"THIS FILE IS AUTOGENERATED FROM .... SEE THE PERSISTANCE DOCS"

Joshua D. Drake

>
> regards, tom lane
>

--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564
Consulting, Training, Support, Custom Development, Engineering
If the world pushes look it in the eye and GRR. Then push back harder. - Salamander

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Browne 2009-10-26 19:02:04 Re: License clarification: BSD vs MIT
Previous Message Greg Stark 2009-10-26 18:36:54 Re: Parsing config files in a directory