https://www.postgresql.org/docs/current/storage-page-layout.html#STORAGE-TUPLE-LAYOUT

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: samlaf92(at)gmail(dot)com
Subject: https://www.postgresql.org/docs/current/storage-page-layout.html#STORAGE-TUPLE-LAYOUT
Date: 2026-11-22 15:08:44
Message-ID: 179536012475.884072.16862161969047767835@wrigleys.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/19/storage-file-layout.html
Description:

On the "Database Page Layout" page (storage-page-layout.html), Table 66.4
(HeapTupleHeaderData Layout) lists t_cid and t_xvac as separate 4-byte rows.
Added up, the table comes to 27 bytes, but the text just above says the
header is 23 bytes. The note "(overlays with t_xvac)" explains the
difference, but it's easy to miss, and a reader who sums the column will
think the doc is wrong. Could the two fields be shown as one row (e.g.,
"t_cid / t_xvac — 4 bytes — union: insert/delete CID, or XID for VACUUM
moving a row version"), or could the text say outright that they share the
same 4 bytes? It would also help to add one sentence on the effective
per-row cost: on most 64-bit platforms the 23-byte header is padded to 24 by
MAXALIGN, and each tuple also uses a 4-byte line pointer, so the fixed
overhead is about 28 bytes per row before any user data. Right now readers
have to piece that together from three separate parts of the page.

Also think it would be nice to update Figure 66.1 to "open up" and show the
internals of an Item. It's always nice to have a single diagram that
summarizes everything that I should know at a glance. Instead I had to read
the long complex prose paragraph to understand where the HeapTupleHeaderData
actually sits wrt Items, and then got confused by the issue above. Wasn't a
great reader experience. Claude had to help but it could be simplified and
made clearer.

Browse pgsql-docs by date

  From Date Subject
Previous Message Karen Jex 2026-11-21 15:54:07 Re: Good beginner doc-hacking task: clear-text vs. cleartext vs. clear text vs. plaintext etc..