The XLogFindNextRecord() routine find incorrect record start point after a long continuation record

From: Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
To: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: The XLogFindNextRecord() routine find incorrect record start point after a long continuation record
Date: 2019-11-06 02:40:48
Message-ID: 99303554-5dd5-06e6-f943-b3005ccd6edd@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

--
Andrey Lepikhov
Postgres Professional
https://postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
0001-Correct-the-algorithm-of-definition-of-WAL-record-st.patch text/x-patch 1.1 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2019-11-06 04:41:20 Re: The XLogFindNextRecord() routine find incorrect record start point after a long continuation record
Previous Message Bruce Momjian 2019-11-05 20:11:45 Re: BUG #15912: The units of `autovacuum_vacuum_cost_delay` setting should be documented