Re: Bad recovery: no pg_xlog/RECOVERYXLOG

From: Samed YILDIRIM <samed(at)reddoc(dot)net>
To: Marcin Koziej <marcin(at)cahoots(dot)pl>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Bad recovery: no pg_xlog/RECOVERYXLOG
Date: 2017-10-25 17:30:14
Message-ID: 1070071508952614@web46j.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

<div>Hi Marcin,</div><div> </div><div>Could you please share archive_command and restore_command you used? If you are using script inside restore or archive comman, please also share them. It looks like the problem relevant with them.</div><div> </div><div>Best regards.</div><div>Samed YILDIRIM</div><div> </div><div> </div><div>25.10.2017, 19:52, "Marcin Koziej" &lt;marcin(at)cahoots(dot)pl&gt;:</div><blockquote type="cite"><p>Hi!<br /><br />I try to setup continuous archiving with PG 9.6 according to this<br />documentation:<br /><a href="https://www.postgresql.org/docs/9.6/static/continuous-archiving.html">https://www.postgresql.org/docs/9.6/static/continuous-archiving.html</a><br /><br />I have Postgres wal_archive set to replica, I have archive on and<br />archive command is properly copying WAL segments to backup storage.<br /><br />Having this running, I make a successful tar base backup using<br />pg_basebackup.<br /><br />I then stop the DB, remove the data directory, unpack base backup to it,<br />create recovery.conf with a proper restore_command, run the server, and get:<br /><br />LOG:  database system was interrupted; last known up at <span>2017-10-25</span><br />15:47:37 UTC<br />LOG:  starting archive recovery<br />Object 'pg_small3/pg_xlog/RECOVERYXLOG.lzo' not found<br />Cannot download pg_xlog/RECOVERYXLOG.lzo<br />LOG:  invalid checkpoint record<br />FATAL:  could not locate required checkpoint record<br />HINT:  If you are not restoring from a backup, try removing the file<br />"/var/lib/postgresql/data/backup_label".<br />LOG:  startup process (PID 20) exited with exit code 1<br />LOG:  aborting startup due to startup process failure<br />LOG:  database system is shut down<br /><br />The message about "pg_xlog/RECOVERYXLOG.lzo" is written out by<br />restore_command. Indeed, the file is not in the backup storage, and<br />pg_xlog/RECOVERYXLOG was NEVER sent there by archive_command (which<br />compresses and adds .lzo extension)!<br /><br />What could I be doing wrong?<br /> </p><span>--<br />Marcin Koziej </span><p><br />GPG key: <a href="http://go.cahoots.pl/gpg/">http://go.cahoots.pl/gpg/</a> Ϟ Twitter: @movonw<br /><br /><br /><br /> </p><span>--<br />Sent via pgsql-admin mailing list (<a href="mailto:pgsql-admin(at)postgresql(dot)org">pgsql-admin(at)postgresql(dot)org</a>)<br />To make changes to your subscription:<br /><a href="http://www.postgresql.org/mailpref/pgsql-admin">http://www.postgresql.org/mailpref/pgsql-admin</a></span></blockquote>

Attachment Content-Type Size
unknown_filename text/html 2.5 KB

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Marcin Koziej 2017-10-25 18:20:34 Re: Bad recovery: no pg_xlog/RECOVERYXLOG
Previous Message Marcin Koziej 2017-10-25 17:25:20 Re: Bad recovery: no pg_xlog/RECOVERYXLOG