Re: xlogreader v3/xlogdump v2 - Mailing list pgsql-hackers

From Andres Freund
Subject Re: xlogreader v3/xlogdump v2
Date
Msg-id 20121209190532.GD4694@awork2.anarazel.de
Whole thread Raw
In response to xlogreader v3/xlogdump v2  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Hi,

On 2012-12-04 18:52:13 +0100, Andres Freund wrote:
> At
> http://git.postgresql.org/gitweb/?p=users/andresfreund/postgres.git;a=shortlog;h=refs/heads/xlogreader_v3
> git://git.postgresql.org/git/users/andresfreund/postgres.git
> you can find my attempt trying to bring the xlogreader from Heikki, as
> modified by Alvaro, into a state where it has the capabilities to be
> usable for BDR.
>
> This is *preliminary* work, to see whether people roughly agree with the
> API, there is some smoothing of edges left.
>
> Changes I made:
> * Add XLogFindNextRecord, to find the next valid xlog record >= an recptr
> * Move the page validation handling into xlogreader
> * Add support for reading pages which are only partially valid
> * Add callback as a replacement for emode_for_corrupt_record
>
> I don't like the last part, it seems ugly to me, but moving the full
> error processing/formatting to a callback seems to involve more work. I
> am willing to do that work, but would like some input first.
>
> The xlogdump utility itself is in a mostly good state, some parts of
> support infrastructure (ereport wrapper, realpathbackend,
> timestamptz_to_str, pfree) need some work.

I pushed a new version of the patch with some fixes, more comments and a
slightly changed read_page callback API.

Greetings,

Andres Freund

--Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: CommitFest #3 and upcoming schedule
Next
From: Matthew Gerber
Date:
Subject: Re: Unresolved error 0xC0000409 on Windows Server