Re: The XLogFindNextRecord() routine find incorrect record startpoint after a long continuation record - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: The XLogFindNextRecord() routine find incorrect record startpoint after a long continuation record
Date
Msg-id 20191107034136.GI1768@paquier.xyz
Whole thread Raw
In response to ***UNCHECKED*** Re: The XLogFindNextRecord() routine find incorrectrecord start point after a long continuation record  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: The XLogFindNextRecord() routine find incorrect record startpoint after a long continuation record  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-bugs
On Thu, Nov 07, 2019 at 02:41:29AM +0900, Fujii Masao wrote:
> I created the problematic WAL file artificially by using
> pg_logical_emit_message() and sucessfully reproduced
> the error.

Good idea.  I didn't know this one.

> I attached the WAL file that I created. You can
> reproduce the issue by
>
>     pg_waldump 000000010000000000000008 -s 0/08002028

Assertion failure reproduced here.

> The patch looks good to me. Barrying any objection, I will commit it.
> XLogFindNextRecord() must return the valid record starting position,
> but currently could return the starting position of WAL page
> (not valid WAL record) in the case that you described. This is
> the cause of the issue.

No issues from here, thanks for taking care of it.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #16094: Database entering recovery mode
Next
From: vignesh C
Date:
Subject: Re: Reorderbuffer crash during recovery