pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
recovery.conf restore_command
2+ messages / 2 participants
[nested] [flat]

* recovery.conf restore_command
@ 2014-07-08 16:19  John Scalia <jayknowsunix@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: John Scalia @ 2014-07-08 16:19 UTC (permalink / raw)
  To: pgsql-admin

Hi all,

I was experimenting with the restore_command on one of my standby systems. Originally this command just had:

restore_command='cp /mnt/wallogs/archive/%f %p'

And it was, and is working just fine, but since that doesn't delete the WAL files from the archive directory, I wanted to try:

restore_command='pg_standby /mnt/wallogs/archive %f %p %r'

But, the database then refused to start. The log showed:

LOG: entering standby mode
FATAL: could not restore file "00000003.history" from archive: return code 32512
LOG: startup process (PID 22847) existed with exit code 1

Now, that history file was already in the standby's pg_xlog directory. So, I tried copying it back to the archive directory and trying again, but no joy. I double-checked the 
permissions on the file and the directory and those were good. So, I just changed the restore_command back to its original form, and the standby then started successfully. Did I 
use pg_standby incorrectly? FYI, these servers are streaming replication using Version 9.3.3.
--
Jay


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: recovery.conf restore_command
@ 2014-07-08 17:29  Gilberto Castillo <gilberto.castillo@etecsa.cu>
  parent: John Scalia <jayknowsunix@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Gilberto Castillo @ 2014-07-08 17:29 UTC (permalink / raw)
  To: John Scalia <jayknowsunix@gmail.com>; +Cc: pgsql-admin



>
> Hi all,
>
> I was experimenting with the restore_command on one of my standby systems.
> Originally this command just had:
>
> restore_command='cp /mnt/wallogs/archive/%f %p'
>
> And it was, and is working just fine, but since that doesn't delete the
> WAL files from the archive directory, I wanted to try:
>
> restore_command='pg_standby /mnt/wallogs/archive %f %p %r'
>
> But, the database then refused to start. The log showed:
>
> LOG: entering standby mode
> FATAL: could not restore file "00000003.history" from archive: return code
> 32512
> LOG: startup process (PID 22847) existed with exit code 1
>
> Now, that history file was already in the standby's pg_xlog directory. So,
> I tried copying it back to the archive directory and trying again, but no
> joy. I double-checked the
> permissions on the file and the directory and those were good. So, I just
> changed the restore_command back to its original form, and the standby
> then started successfully. Did I
> use pg_standby incorrectly? FYI, these servers are streaming replication
> using Version 9.3.3.

In my case I use a script where I can place several operations like
deleting the log etc.

Saludos,
Gilberto Castillo
La Habana, Cuba
--- 
This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE running at host imx3.etecsa.cu
Visit our web-site: <http://www.kaspersky.com;, <http://www.viruslist.com;

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2014-07-08 17:29 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-07-08 16:19 recovery.conf restore_command John Scalia <jayknowsunix@gmail.com>
2014-07-08 17:29 ` Gilberto Castillo <gilberto.castillo@etecsa.cu>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox