Re: tid_blockno() and tid_offset() accessor functions

Greg Sabino Mullane <htamfids@gmail.com>

From: Greg Sabino Mullane <htamfids@gmail.com>
To: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>, Masahiko Sawada <sawada.mshk@gmail.com>, Andres Freund <andres@anarazel.de>, Ayush Tiwari <ayushtiwari.slg01@gmail.com>, pgsql-hackers@postgresql.org
Date: 2026-03-13T17:18:09Z
Lists: pgsql-hackers
On Fri, Mar 13, 2026 at 1:08 PM Matthias van de Meent <
boekewurm+postgres@gmail.com> wrote:

> As for naming; I'd personally prefer to have 'heap' included in the names
> here (e.g. heaptid_blkno(tid) or heap_blkno[_of](tid)), because
> not all AMs may map tid.blkno exactly to a block number in the main fork.


All our docs and code mention blocks and offsets as the components of a
tid, so -1 on making things more obtuse.

-- 
Cheers,
Greg

Commits

  1. Add tid_block() and tid_offset() accessor functions