pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Subject: Re: WAL record CRC calculated incorrectly because of underlying buffer modification
Date: Fri, 17 May 2024 07:56:23 -0700
Message-ID: <a4e1196a77f154ccf8df486a632d998525a1becc.camel@j-davis.com> (raw)
In-Reply-To: <ZkavFZeGgPlaQ-W5@paquier.xyz>
References: <055bb33c-bccc-bc1d-c2f8-8598534448ac@gmail.com>
	<20240510155742.sznwmnmllsewjsbc@awork3.anarazel.de>
	<CA+hUKGKmi5VhDAq1O2gU55Qy_zQymSfF73nCaC9HBjnA50qdHQ@mail.gmail.com>
	<0a2e14d3-fbc8-9e86-a968-e0c4a465e5b0@gmail.com>
	<CA+hUKGJEtb65B+v2Vk25WbvvALH5DxL5Oye=DuhCVP8K1X3Obg@mail.gmail.com>
	<35e2c2f8-f65a-f93a-ea23-957bb67a2d42@gmail.com>
	<CA+hUKG+=cb86CYa4W42z4wFBMwjQE2=O9RFC+i4QZuCB+d2p0A@mail.gmail.com>
	<895723aba95f108207a744c799588ec3f2fef819.camel@j-davis.com>
	<ZkavFZeGgPlaQ-W5@paquier.xyz>

On Fri, 2024-05-17 at 10:12 +0900, Michael Paquier wrote:
> That's something I've done four weeks ago in the hash replay code
> path, and having the image with XLR_CHECK_CONSISTENCY even if
> REGBUF_NO_CHANGE was necessary because replay was setting up a LSN on
> a REGBUF_NO_CHANGE page it should not have touched.

Then the candidate fix to selectively break XLR_CHECK_CONSISTENCY is
not acceptable.

> 
> Yeah, agreed that getting rid of REGBUF_NO_CHANGE would be nice in
> the
> final picture.  It still strikes me as a weird concept that WAL
> replay
> for hash indexes logs full pages just to be able to lock them at
> replay based on what's in the records.  :/

I'm still not entirely clear on why hash indexes can't just follow the
rules and exclusive lock the buffer and dirty it. Presumably
performance would suffer, but I asked that question previously and
didn't get an answer:

https://www.postgresql.org/message-id/CA%2BTgmoY%2BdagCyrMKau7UQeQU6w4LuVEu%2ByjsmJBoXKAo6XbUUA%40ma...

And if that does affect performance, what about following the same
protocol as XLogSaveBufferForHint()?

Regards,
	Jeff Davis






view thread (37+ messages)  latest in thread

Message-ID: <a4e1196a77f154ccf8df486a632d998525a1becc.camel@j-davis.com>
Permalink:  ../a4e1196a77f154ccf8df486a632d998525a1becc.camel@j-davis.com/
Also on:    postgresql.org/message-id/a4e1196a77f154ccf8df486a632d998525a1becc.camel@j-davis.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: pgsql@j-davis.com, michael@paquier.xyz, thomas.munro@gmail.com, exclusion@gmail.com, andres@anarazel.de, amit.kapila16@gmail.com, hlinnaka@iki.fi
  Subject: Re: WAL record CRC calculated incorrectly because of underlying buffer modification
  In-Reply-To: <a4e1196a77f154ccf8df486a632d998525a1becc.camel@j-davis.com>
  References: <055bb33c-bccc-bc1d-c2f8-8598534448ac@gmail.com> <20240510155742.sznwmnmllsewjsbc@awork3.anarazel.de> <CA+hUKGKmi5VhDAq1O2gU55Qy_zQymSfF73nCaC9HBjnA50qdHQ@mail.gmail.com> <0a2e14d3-fbc8-9e86-a968-e0c4a465e5b0@gmail.com> <CA+hUKGJEtb65B+v2Vk25WbvvALH5DxL5Oye=DuhCVP8K1X3Obg@mail.gmail.com> <35e2c2f8-f65a-f93a-ea23-957bb67a2d42@gmail.com> <CA+hUKG+=cb86CYa4W42z4wFBMwjQE2=O9RFC+i4QZuCB+d2p0A@mail.gmail.com> <895723aba95f108207a744c799588ec3f2fef819.camel@j-davis.com> <ZkavFZeGgPlaQ-W5@paquier.xyz> <a4e1196a77f154ccf8df486a632d998525a1becc.camel@j-davis.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox