Re: includeifexists in configuration file

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: includeifexists in configuration file
Дата
Msg-id 4EE9E011.4000301@2ndQuadrant.com
обсуждение исходный текст
Ответ на Re: includeifexists in configuration file  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: includeifexists in configuration file  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On 12/12/2011 04:47 PM, Andrew Dunstan wrote:
> I have briefly looked at the code (but not tried to apply or build
> it), and modulo the naming issue it looks OK to me.
> Unless there is some other issue let's just get it applied. It looks
> like almost a no-brainer to me.

It isn't very fancy, but is does something people that can fit into a
couple of use-cases.  Attached update has two changes to address the
suggestions I got, which closes everything I knew about with this one:

-It's now include_if_exists
-Files that are skipped are logged now

So current behavior:

$ tail -n 1 postgresql.conf
include 'missing.conf'
$ start
server starting
$ tail $PGLOG
LOG:  could not open configuration file
"/home/gsmith/pgwork/data/include-exists/missing.conf": No such file or
directory
FATAL:  configuration file
"/home/gsmith/pgwork/data/include-exists/postgresql.conf" contains errors

And new behavior:

$ vi $PGDATA/postgresql.conf
$ tail -n 1 postgresql.conf
include_if_exists 'missing.conf'
$ start
server starting
$ tail $PGLOG
LOG:  skipping missing configuration file
"/home/gsmith/pgwork/data/include-exists/missing.conf"
LOG:  database system was shut down at 2011-12-15 06:48:46 EST
LOG:  database system is ready to accept connections

--
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us


Вложения

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: review: CHECK FUNCTION statement
Следующее
От: Greg Smith
Дата:
Сообщение: Re: IDLE in transaction introspection