includeifexists in configuration file

Поиск
Список
Период
Сортировка
От Greg Smith
Тема includeifexists in configuration file
Дата
Msg-id 4EC349E4.1010504@2ndQuadrant.com
обсуждение исходный текст
Ответы Re: includeifexists in configuration file  (Euler Taveira de Oliveira <euler@timbira.com>)
Re: includeifexists in configuration file  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
By recent popular request in the ongoing discussion saga around merging
the recovery.conf, I've added an "includeifexists" directive to the
postgresql.conf in the attached patch.  Demo:

$ tail -n 1 $PGDATA/postgresql.conf
include 'missing.conf'
$ pg_ctl start -l $PGLOG
server starting
$ tail -n 2 $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
$ vi $PGDATA/postgresql.conf
$ tail -n 1 $PGDATA/postgresql.conf
includeifexists 'missing.conf'
$ pg_ctl start -l $PGLOG
server starting
$ tail -n 3 $PGLOG
LOG:  database system was shut down at 2011-11-16 00:17:36 EST
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started

There might be a cleaner way to write this that eliminates some of the
cut and paste duplication between this and the regular include
directive.  I'm short on clever but full of brute force tonight.

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


Вложения

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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Configuration include directory
Следующее
От: Dan Ports
Дата:
Сообщение: Re: FlexLocks