Storage & tuples

Line pointer (ItemId)

Also called: item pointer, ItemIdData, line pointer array

Every 8 KB page keeps a small array of slots near its top. Each slot, a line pointer, records where a row lives inside the page and what state it is in. Indexes and queries reach a row through its line pointer, not by a fixed offset, so the row's body can move within the page while the pointer stays put.

What this means

Near the top of every 8 KB page is a little array of slots. Each slot, called a line pointer, says where a row sits on the page and what state it's in. Indexes point at the slot, not at a fixed spot, so Postgres can shuffle a row's body around inside the page during cleanup without breaking any index that references it.

Why it matters operationally

Pruning and VACUUM work by rewriting line pointers, not by deleting bytes. A slot can be NORMAL (live row), REDIRECT (points to another slot, used by HOT chains), DEAD (row gone but an index still references the slot), or UNUSED (free for reuse). Reading these states with pageinspect is how you see cleanup actually happen.

Related & next

Heap Pruning, how line pointers are rewritten during cleanupHeap-Only Tuple, why REDIRECT line pointers existPage (data block), the structure line pointers live in

Mentioned from

← All glossary terms · GUC reference · Error catalog