Re: Hash index: stop registering pin-only bucket pages in WAL (remove REGBUF_NO_CHANGE)

From: Greg Burd <greg(at)burd(dot)me>
To: vignesh C <vignesh21(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Hayato Kuroda <kuroda(dot)hayato(at)fujitsu(dot)com>, Joao Rito <joaovictor(dot)rito(at)gmail(dot)com>, shihao zhong <zhong950419(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Jeff Davis <pgsql(at)j-davis(dot)com>, Alexander Lakhin <exclusion(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Hash index: stop registering pin-only bucket pages in WAL (remove REGBUF_NO_CHANGE)
Date: 2026-11-17 20:21:09
Message-ID: avy2xQVLYoA4mDno@werk
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amit, Vignesh,

Agreed, and thanks Vignesh for splitting it out. v13 is what I had in
mind: the torn-page read fix on its own, backpatchable, with the
recovery test and the HEAD-only rework (dropping the pin-only
registration, removing REGBUF_NO_CHANGE) left for a separate commit on
master once this is in.

I confirmed the two patches apply where Vignesh said: v13-0001 from
master through PG17, and v13_REL16-0001 on PG16 and PG15.

I am re-attaching Vignesh's two patches unchanged so this message has
the reviewed set in one place. No change from his v13.

For the follow-up on master I will post the test and the pin-only rework
as their own thread-continuation once the fix lands, including the
arch-independent torn-page test (it keys the deletion off the actual
overflow-page contents with pageinspect, so it holds on 32-bit, and
writes backup_label in binary mode so it holds on Windows). No need to
hold the fix for that.

-greg

Attachment Content-Type Size
v13-0001-Fix-hash-index-redo-reading-a-torn-primary-bucket.patch text/x-patch 7.8 KB
v13_REL16-0001-Fix-hash-index-redo-reading-a-torn-primary.patch text/x-patch 7.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2026-11-17 20:42:06 Re: Assert failure in parallel query due to SubPlan double visit for hash join
Previous Message Greg Burd 2026-11-17 20:11:48 Re: Keep TIDBitmap pagetable memory across bitmap scans