Re: Parsing config files in a directory

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parsing config files in a directory
Date: 2009-10-24 16:52:25
Message-ID: 4AE330C9.1010808@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander wrote:
>> I'm happy with the new feature, however, so is there a way to do this?
>>
>> Could we have a new directive in postgresql.conf that allows you to
>> specify an includedirectory? Like an include directive but for a whole
>> directory rather than just a file.
>>
>
> We could do it that way, but that would make the change bigger, not smaller :-P
>

If we're going to do this at all, ISTM the location should be
configurable, just like other file locations are.

>
>
>> Users would then also be able to
>> specify more than one directory, if required. This way we would allow
>> people to have the multi-conf file feature but without changing existing
>> ways of working. By default, we would have one entry at the bottom of
>> postgresql.conf which would point to pg_conf, a new directory that
>> starts off empty. So by default, nothing has changed, yet the new
>> feature is allowed.
>>
>
> Did you look at the patch? That's basically what it does now, except
> it doesn't add a parameter in postgresql.conf. If you lkeave the
> pg_config directory empty, it will just parse the postgresql.conf file
> just like before, and that's it. only if you put something in the
> pg_config directory will it load it, and only *after* it has loaded
> the main configuration file.
>
>

What bothers me some is that it sounds like a bit of a footgun. A
postgres cluster is a shared resource, and we surely don't want
applications meddling with the shared config. This seems quite different
from, say, an application dropping a file in /etc/cron.d.

I don't have strong feelings on it, but I do have some niggling worries.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2009-10-24 16:57:07 Re: Parsing config files in a directory
Previous Message Simon Riggs 2009-10-24 16:51:19 Re: Parsing config files in a directory