Re: Parsing config files in a directory

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Parsing config files in a directory
Дата
Msg-id 9837222c0910240934v60287d43r7980efdee15998fb@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Parsing config files in a directory  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Parsing config files in a directory  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Parsing config files in a directory  (Andrew Dunstan <andrew@dunslane.net>)
Re: Parsing config files in a directory  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
2009/10/24 Simon Riggs <simon@2ndquadrant.com>:
> On Sat, 2009-10-24 at 15:41 +0200, Magnus Hagander wrote:
>
>> Per discussion at the developer meeting back in Ottawa, attached is an
>> initial patch that implements reading a directory of configuration
>> files instead of just one. The idea being that something like a tuning
>> tool, or pgadmin, for example can drop and modify files in this
>> directory instead of modifying the main config file (which can be very
>> hard to machine-parse). The idea is the same as other software like
>> apache that parses multiple files.
>>
>> Files are parsed in alphabetical order so it's predictable, and you
>> can make sure some files override others etc.
>>
>> Comments, before I go do the final polishing? :-)
>
> I really don't like this at all. It seems like too much change. The
> whole world knows about postgresql.conf, lets not change that.

We're not. It will still be there, just like before. We're just adding
one more way to do it.

> 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


> 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.


-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Parsing config files in a directory
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Parsing config files in a directory