From: John Scalia <jayknowsunix@gmail.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: recovery.conf restore_command
Date: Tue, 08 Jul 2014 12:19:59 -0400
Message-ID: <53BC1A2F.4010501@gmail.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: jayknowsunix@gmail.com
Subject: Re: recovery.conf restore_command
In-Reply-To: <53BC1A2F.4010501@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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