Search Postgresql Archives

archive_command with an environnement variable ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux