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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: The XLogFindNextRecord() routine find incorrect record start point after a long continuation record
Date: 2019-11-07 03:41:36
Message-ID: 20191107034136.GI1768@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message vignesh C 2019-11-07 04:25:16 Re: Reorderbuffer crash during recovery
Previous Message Michael Paquier 2019-11-07 02:35:51 Re: BUG #16094: Database entering recovery mode