archive_command with an environnement variable ?

From: Eric Pailleau <eric(at)numlog(dot)fr>
To: pgsql-general(at)postgresql(dot)org
Subject: archive_command with an environnement variable ?
Date: 2007-09-06 15:22:33
Message-ID: 46E01B39.5060004@numlog.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2007-09-06 15:27:41 Re: Alias "all fields"?
Previous Message RC Gobeille 2007-09-06 15:06:28 tsearch2 anomoly?