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

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Pavan Deolasee <pavan(dot)deolasee(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 12:46:08
Message-ID: CAB7nPqSsxp4ObjWmAQV-c=z-C6WpbSm1w_dKG9jMpvZsjW017A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 23, 2016 at 7:04 PM, Pavan Deolasee
<pavan(dot)deolasee(at)gmail(dot)com> wrote:
>
>
> 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.

I'd just add dots at the end of the sentences in the comment blocks
because that's project style, but I'm being picky, except that the
logic looks quite good.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2016-03-23 12:46:54 Re: BRIN is missing in multicolumn indexes documentation
Previous Message Michael Paquier 2016-03-23 12:43:29 Re: Proposal: "Causal reads" mode for load balancing reads without stale data