Yep, I checked:

[postgres@uxmal standby_node]$ /bin/tar -xzf
/db/wal_archives/00000001000001ED000000FB.tar.gz -C
/db/standby_node/pg_xlog/
[postgres@uxmal standby_node]$ echo $?
0
[postgres@uxmal standby_node]$ ls /db/standby_node/pg_xlog/ | grep
00000001000001ED000000FB
00000001000001ED000000FB

I read somewhere that in order for the extracted file to be placed at a
custom location you had to use that option -C

I'll try rewriting the command and debug it. Thanks for your comment.



2014-04-13 21:39 GMT-05:00 Stephen Frost <sfr...@snowman.net>:

> Rene,
>
> * Rene Romero Benavides (rene.romer...@gmail.com) wrote:
> > restore_command='/bin/tar -xzf /db/wal_archives/%f.tar.gz -C %p'
> [...]
> > I tested the restore_command replacing variables and it works. Any ideas
> on
> > why it isn't being executed?
>
> Are you sure that it isn't being executed and just immediately returning
> '1' (meaning 'false'- aka, done with recovery)?
>
> The -C option to tar is supposed to be "change directory" according to
> the tar that I've got, and %p is the complete file name that PG wants
> the WAL file to be copied to- it's not a directory (it's something like
> pg_xlog/RECOVERY_WAL).
>
>         Thanks,
>
>                 Stephen
>



-- 
El genio es 1% inspiraciĆ³n y 99% transpiraciĆ³n.
Thomas Alva Edison
http://pglearn.blogspot.mx/

Reply via email to