Re: The XLogFindNextRecord() routine find incorrect record start point after a long continuation record
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2019-11-06T04:41:20Z
Lists: pgsql-bugs
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.com Reminds me as well of the following: https://www.postgresql.org/message-id/CAOR=d=16x+jKM=00AoEZEKU9RJDwjU9E2bUnFBpX_HrGjkMHXg@mail.gmail.com -- Michael
Commits
-
Fix assertion failure when running pgbench -s.
- 1accf9974821 9.4.25 landed
- b1bebc2cee58 9.5.20 landed
- aa7cd6a8e741 9.6.16 landed
- 127ad57f5d44 10.11 landed
- fb53c4c07fec 11.6 landed
- e5cfb8cbbe91 12.1 landed
- a0c96856e8b3 13.0 landed
-
Fix pg_xlogdump so that it handles cross-page XLP_FIRST_IS_CONTRECORD record.
- bab7823a49bb 10.0 cited