Re: pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data

From: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_xlogdump fails to handle WAL file with multi-page XLP_FIRST_IS_CONTRECORD data
Date: 2016-03-23 10:04:11
Message-ID: CABOikdNRQ8NzWdBEfGL+5TduW_GsdopOCRgv1888iD2k3q4Bjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 23, 2016 at 1:13 PM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:

>
> + /*
> + * Compute targetRecOff. It should typically be greater than short
> + * page-header since a valid record can't , but can also be zero
> when
> + * caller has supplied a page-aligned address or when we are
> skipping
> + * multi-page continuation record. It doesn't matter though because
> + * ReadPageInternal() will read at least short page-header worth of
> + * data
> + */
> This needs some polishing, there is an unfinished sentence here.
>
> + targetRecOff = tmpRecPtr % XLOG_BLCKSZ;
> targetRecOff, pageHeaderSize and targetPagePtr could be declared
> inside directly the new while loop.
>

Thanks Michael for reviewing the patch. I've fixed these issues and new
version is attached.

Thanks,
Pavan

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

Attachment Content-Type Size
xlogdump_multipage_cont_record_v2.patch application/octet-stream 3.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernd Helmle 2016-03-23 10:32:06 Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)
Previous Message Aleksander Alekseev 2016-03-23 09:49:50 Re: Patch: fix lock contention for HASHHDR.mutex