Re: Parsing config files in a directory - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Parsing config files in a directory
Date
Msg-id 407d949e0910261413y1578051ao37a0738f52320b73@mail.gmail.com
Whole thread Raw
In response to Re: Parsing config files in a directory  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Parsing config files in a directory
Re: Parsing config files in a directory
List pgsql-hackers
On Mon, Oct 26, 2009 at 1:40 PM, Josh Berkus <josh@agliodbs.com> wrote:
>
> Different issue, really, which is that some people (including me) would
> like to break up PostgreSQL configuration into 7 or 8 files based on
> functional area (e.g. memory.conf, logging.conf, custom_options.conf
> ...).  I do this with my Apache configs, and find it vastly more
> manageable than one big file, especially under SCM.    If I write a
> config management tool, my tool will also do this.

This actually seems like a bad idea to me. It's fine for something
like apache virtual hosts where there's no ambiguity and in any case
it's you organizing it and you reading it back out. But for a tool to
do this is only going to lead to confusion when my thinking of where
to find the variables differs from yours.

>
> That's the reason for the dir, not persistent.conf, which I agree could
> be a single file.

Well you're assuming there's only one tool generating this config? We
have at least two and possibly more. initdb generates an initial set
of defaults, the user may well run some kind of autotuning program,
and then they also have variables set by SET PERSISTENT. That's three
pieces of configuration being edited by different pieces of software.
The only way that will stay sane will be if each piece of software has
its own file to dump its own configuration into. If they start editing
each others configuration it'll all be one big pile of
non-deterministic spaghetti.


--
greg


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Anonymous Code Blocks as Lambdas?
Next
From: Dimitri Fontaine
Date:
Subject: Re: Parsing config files in a directory