archive_command with an environnement variable ?

Поиск
Список
Период
Сортировка
От Eric Pailleau
Тема archive_command with an environnement variable ?
Дата
Msg-id 46E01B39.5060004@numlog.fr
обсуждение исходный текст
Ответы Re: archive_command with an environnement variable ?  (Greg Smith <gsmith@gregsmith.com>)
Список pgsql-general
Dear all,

In Postgresql documentation we have an example of the directive archive_command (for WAL) :

archive_command = 'cp -i %p /mnt/server/directory_archive/%f </dev/null'

or better :

archive_command = 'test ! -f /mnt/server/directory_archive/%f && cp %p /mnt/server/directory_archive/%f'

It look like this command is spawn to the system ( exec() or something... )

so I wonder if we can use environnement variable directly or by sourcing an env file, i.e :

archive_command = 'test ! -f $myvar/%f && cp %p $myvar/%f'
or
archive_command = 'csh ; source ~/.cshrc && test ! -f $myvar/%f && cp %p $myvar/%f'

Thanks for help.

Regards.



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

Предыдущее
От: Max
Дата:
Сообщение: arrays of foreign keys
Следующее
От: Darek Czarkowski
Дата:
Сообщение: Re: Postgresql 7.3 on Red Hat Enterprise 5 (Problem with SEMMNI, SEMMNS)