archive_command with an environnement variable ? - Mailing list pgsql-general

From Eric Pailleau
Subject archive_command with an environnement variable ?
Date
Msg-id 46E01B39.5060004@numlog.fr
Whole thread Raw
Responses Re: archive_command with an environnement variable ?
List 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 by date:

Previous
From: Max
Date:
Subject: arrays of foreign keys
Next
From: Darek Czarkowski
Date:
Subject: Re: Postgresql 7.3 on Red Hat Enterprise 5 (Problem with SEMMNI, SEMMNS)