pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: The XLogFindNextRecord() routine find incorrect record start point after a long continuation record
Date: Wed, 6 Nov 2019 13:41:20 +0900
Message-ID: <20191106044120.GF1604@paquier.xyz> (raw)
In-Reply-To: <99303554-5dd5-06e6-f943-b3005ccd6edd@postgrespro.ru>
References: <99303554-5dd5-06e6-f943-b3005ccd6edd@postgrespro.ru>

On Wed, Nov 06, 2019 at 07:40:48AM +0500, Andrey Lepikhov wrote:
> I found this in our multimaster project on PostgreSQL 11.5. It is difficult
> to reproduce this error, but I will try to do it if necessary.
> 
> The rest of a continuation WAL-record can exactly match the block size. In
> this case, we need to switch targetPagePtr to the next block before
> calculating the starting point of the next WAL-record.
> See the patch in attachment for the bug fix.

What's the error you actually saw after reading the record in
xlogreader.c?  If you have past WAL archives, perhaps you are able to
reproduce the problem with a given WAL segment and pg_waldump?

This code rings a bell as of this thread which led to commit bab7823:
https://www.postgresql.org/message-id/CABOikdPsPByMiG6J01DKq6om2+BNkxHTPkOyqHM2a4oYwGKsqQ@mail.gmail...

Reminds me as well of the following:
https://www.postgresql.org/message-id/CAOR=d=16x+jKM=00AoEZEKU9RJDwjU9E2bUnFBpX_HrGjkMHXg@mail.gmail...
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (7+ messages)  latest in thread

Message-ID: <20191106044120.GF1604@paquier.xyz>
Permalink:  ../20191106044120.GF1604@paquier.xyz/
Also on:    postgresql.org/message-id/20191106044120.GF1604@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, a.lepikhov@postgrespro.ru, pgsql-bugs@lists.postgresql.org
  Subject: Re: The XLogFindNextRecord() routine find incorrect record start point after a long continuation record
  In-Reply-To: <20191106044120.GF1604@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox