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

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Greg Burd' <greg(at)burd(dot)me>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: shihao zhong <zhong950419(at)gmail(dot)com>, vignesh C <vignesh21(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" <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-12 10:41:11
Message-ID: OS7PR01MB183170BFC7B03474C536757F3F5702@OS7PR01MB18317.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I started to study the thread. Here are minor comments for 0002.
I understood the refactoring must be done master-only.

01.
```
+static Buffer
+hash_xlog_lock_bucket(XLogReaderState *record, uint8 block_id, Size rec_size)
```

I think the function name is too general. IIUC the function intends to lock a
primary page, but it's not described in the function name. How about renaming to
"hash_xlog_lock_primary_bucket" or similar?

02.
```
+ /* block 0 is absent if the primary bucket page is not modified */
```

I felt this comment can be more friendly like:

```
/*
* If the primary bucket page is modified, it is registered as block 0
* and read for REDO. Otherwise, acquire its cleanup lock separately.
*/
```

Best regards,
Hayato Kuroda
FUJITSU LIMITED

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2026-11-12 11:10:13 Re: Crashes on a partition whose concurrent detach never finished
Previous Message Ilia Evdokimov 2026-11-12 10:36:14 Re: Memoize: stale entry pointer after cache_store_tuple()