Re: BUG #8043: 9.2.4 doesn't open WAL files from archive, only looks in pg_xlog

From: Jeff Bohmer <bohmer(at)visionlink(dot)org>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #8043: 9.2.4 doesn't open WAL files from archive, only looks in pg_xlog
Date: 2013-04-08 16:06:13
Message-ID: 29E6C8DE-6DF2-46AD-A178-8F7147DF6699@visionlink.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers


On Apr 6, 2013, at 2:24 AM, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> wrote:

> Incidentally, I bumped into another custom backup script just a few weeks back that also excluded backup_label. I don't know what the author was thinking when he wrote that, but it seems to be a surprisingly common mistake. Maybe it's the "label" in the filename that makes people think it's not important. Perhaps we should improve the documentation to make it more explicit that backup_label must be included in the backup. The docs already say that, though, so I suspect that people making this mistake have not read the docs very carefully anyway.
>
> Perhaps a comment in the beginning of backup_label would help:
>
> # NOTE: This file MUST be included in the backup. Otherwise, the backup
> # is inconsistent, and restoring it may result in a corrupt database.
>
> Jeff B., assuming that you excluded backup_label from the backup for some reason, do you have any thoughts on what would've helped you to avoid that mistake? Would a comment like above have helped - did you look inside backup_label at any point?

I think such a comment could be helpful. The base backups did contain backup_label. That is how another script would determine what WAL files to remove. It looked at the oldest base backup's backup_label file to get the oldest WAL file to keep.

My problem was that backup_label was excluded from the data directory when it was sync'd from the base backup. (We keep base backups separate from data directories, so they can be reused.) I guess it was excluded because it was assumed to not be used by archive recovery. So, clarifying backup_label's importance there seems helpful.

Thank you for your help,
- Jeff
--
Jeff Bohmer | Corporate Technology Manager | VisionLink, Inc.
First National Center | 3101 Iris Avenue, Suite 240 | Boulder CO, 80301

Office 303.402.0170 x121

Other ways to stay in touch - Blog | Twitter | Facebook | LinkedIn | Web

This message and any attachments may contain information that is privileged,
confidential or exempt from disclosure under applicable law or agreement. If you
have received this message in error, please reply and delete the message and
any attachments without opening the attachment. Thank you.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message dmitigr 2013-04-08 21:33:24 BUG #8046: PL/pgSQL plan caching regression
Previous Message Jeff Bohmer 2013-04-08 15:58:37 Re: BUG #8043: 9.2.4 doesn't open WAL files from archive, only looks in pg_xlog

Browse pgsql-hackers by date

  From Date Subject
Next Message Ants Aasma 2013-04-08 16:26:33 Re: Inconsistent DB data in Streaming Replication
Previous Message Jeff Bohmer 2013-04-08 15:58:37 Re: BUG #8043: 9.2.4 doesn't open WAL files from archive, only looks in pg_xlog