Re: Couple of issues with pg_xlogdump - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: Couple of issues with pg_xlogdump
Date
Msg-id CAMkU=1zD8U7ZzUkraDn9RxOp5eMoXW347Y_X-rg5AYLrEy8Skg@mail.gmail.com
Whole thread Raw
In response to Re: Couple of issues with pg_xlogdump  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Tue, Apr 23, 2013 at 2:30 AM, Andres Freund <andres@2ndquadrant.com> wrote:
On 2013-04-23 14:51:05 +0530, Pavan Deolasee wrote:

> [pavan.deolasee@puppetserver pg_xlogdump]$ ./pg_xlogdump
> ~/db93head/pg_xlog/000000010000000000000008
> pg_xlogdump: FATAL:  could not find a valid record after 0/8000000
>
> So pg_xlogdump gives error for all WAL files except the first one. Should
> it not have printed the WAL records from these files ?

Probably not. Those are likely renamed wal files that do not yet contain
valid data.

But they do contain valid data, just not for the name the file currently has.  If you can guess what the pre-recycle name was, you can rename the file (as an out-of-tree copy of course) and then get the dump out of it, which I've found can be quite useful.  Perhaps there should be an option for it to "press on regardless" and dump the contents as if it were the pre-recycled file.  Or maybe just have the error message report to you what filename the data it sees would be valid for, so you can know what to rename it to without needing to guess.  I don't really know how this would interact with STARTSEG and ENDSEG range, though, so perhaps it would only apply when just one file is given, not a range.
 
Cheers,

Jeff

pgsql-hackers by date:

Previous
From: David Gudeman
Date:
Subject: Re: minimizing the target list for foreign data wrappers
Next
From: David Fetter
Date:
Subject: Re: minimizing the target list for foreign data wrappers