Re: Is this a problem in GenericXLogFinish()?

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is this a problem in GenericXLogFinish()?
Date: 2023-10-26 05:06:23
Message-ID: 8a1c93b33b6e0aac92b771339cce520eac0adf96.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2023-10-26 at 07:00 +0300, Alexander Lakhin wrote:

> It looks like the buffer is not dirty in the problematic call.

Thank you for the report! I was able to reproduce and observe that the
buffer is not marked dirty.

The call (hashovfl.c:671):

XLogRegisterBuffer(1, wbuf, REGBUF_STANDARD)

is followed unconditionally by:

PageSetLSN(BufferGetPage(wbuf), recptr)

so if the Assert were not there, it would be setting the LSN on a page
that's not marked dirty. Therefore I think this is a bug, or at least
an interesting/unexpected case.

Perhaps the registration and the PageSetLSN don't need to happen when
nitups==0?

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2023-10-26 05:34:10 Re: Document aggregate functions better w.r.t. ORDER BY
Previous Message Amit Kapila 2023-10-26 04:42:12 Re: Open a streamed block for transactional messages during decoding