Re: strange perf regression with data checksums

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Tomas Vondra <tomas(at)vondra(dot)me>
Cc: Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: strange perf regression with data checksums
Date: 2025-05-19 17:20:33
Message-ID: CAH2-Wzk5NK09CsBD3teU1aK7obGnANfgwQgmFWR4yCf95xDKMg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 19, 2025 at 12:42 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> We don't actually need to call BufferGetLSNAtomic() from _bt_readpage
> during index-only scans (nor during bitmap index scans). We can just
> not call BufferGetLSNAtomic() at all (except during plain index
> scans), with no possible downside.

Attached quick-and-dirty prototype patch shows how this could work. It
fully avoids calling BufferGetLSNAtomic() from _bt_readpage() during
index-only scans. I find that "meson test" passes with the patch
applied (I'm reasonably confident that this general approach is
correct).

Does this patch of mine actually fix the regressions that you're
concerned about?

--
Peter Geoghegan

Attachment Content-Type Size
v1-0001-Avoid-BufferGetLSNAtomic-calls-during-index-only-.patch application/octet-stream 6.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-05-19 18:01:30 Re: strange perf regression with data checksums
Previous Message Jeff Davis 2025-05-19 17:02:52 Re: Avoid orphaned objects dependencies, take 3