Re: restore_command ignored in recovery.conf on standby - Mailing list pgsql-general

From Rene Romero Benavides
Subject Re: restore_command ignored in recovery.conf on standby
Date
Msg-id CANaGW0_PZcV+OZZPsN_Xx5V4PfX=uShmhsg0JvMtGyDbY8q0TQ@mail.gmail.com
Whole thread Raw
In response to Re: restore_command ignored in recovery.conf on standby  (Stephen Frost <sfrost@snowman.net>)
Responses Re: restore_command ignored in recovery.conf on standby
List pgsql-general
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 <sfrost@snowman.net>:
Rene,

* Rene Romero Benavides (rene.romero.b@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/

pgsql-general by date:

Previous
From: Stephen Frost
Date:
Subject: Re: restore_command ignored in recovery.conf on standby
Next
From: Stephen Frost
Date:
Subject: Re: restore_command ignored in recovery.conf on standby