Re: recovery.conf restore_command

From: "Gilberto Castillo" <gilberto(dot)castillo(at)etecsa(dot)cu>
To: "John Scalia" <jayknowsunix(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: recovery.conf restore_command
Date: 2014-07-08 17:29:56
Message-ID: 52190.192.168.207.54.1404840596.squirrel@webmail.etecsa.cu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Attachment Content-Type Size
unknown_filename text/plain 179 bytes

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message David Morton 2014-07-09 10:16:26 Re: Safe to gracefully switch 9.2 streaming replication roles multiple times ?
Previous Message John Scalia 2014-07-08 16:19:59 recovery.conf restore_command