Re: Parsing config files in a directory

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Thom Brown <thombrown(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Greg Smith <gsmith(at)gregsmith(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <gsstark(at)mit(dot)edu>, 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-29 14:30:09
Message-ID: 87y6mugtn2.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thom Brown <thombrown(at)gmail(dot)com> writes:
> custom_variable_classes = 'x'
> custom_variable_classes += 'y'
> custom_variable_classes = 'z'
>
> That would result in the first 2 assignments being undone.

That's why I don't see how having as many files as you want to *for tool
based* configuration is a improvement of any sort.

It's certainly a cool piece of feature for those DBA who want to
organise their setup manually without having to add a lot of includes
into their current file. That's fine and convenient. Ok.

But as far as tools is concerned, that only looks awful from here.

I think we have 2 different needs here, and we're trying to abuse a
single mechanism for both. Maybe we need to accept that including all
files in a dir is nice for human organisation of config files but not so
much for automated tools. What they need is a clear API. Or two:

We need one API for editing setup of a live server, that's SET
PERSISTENT ... TO ... and friends (SET PERSISTENT ... APPEND TO ...),
and another one for tools which wants to act from a given setup with no
live server to talk to arround.

Is this second need really important? I guess it is, but the question
would better be explicit I think.

If it is, then we need to provide some kind of multi-language library
for editing our setup, or something so simple you don't need one.

Regards,
--
dim

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2009-10-29 14:46:12 Re: Parsing config files in a directory
Previous Message Tom Lane 2009-10-29 14:17:23 Re: WIP: push AFTER-trigger execution into ModifyTable node