Three history dots face one active seat slot; a red barrier blocks a reactivation arrow from entering the occupied slot.

Partial uniqueness protects the active subset

A partial index stores entries only for rows satisfying its predicate. This can reduce index size when the useful subset is small, but it can also enforce a rule that applies only to that subset. For example, a seat may have many historical reservations while allowing at most one active reservation. A partial unique index expresses that rule at the database boundary. ...

October 15, 2027 · 5 min · XB Field Notes
A B-tree entry uses sku 4321 as the search key and stores price 43215 as payload. The heap page’s all-visible bit gates returning the indexed price or visiting the heap. An Index Only Scan can still access the heap.

Covering indexes can avoid heap visits

A covering index contains the values needed by a particular query. PostgreSQL can sometimes return those values through an index-only scan, avoiding heap visits for qualifying rows. The word “sometimes” matters: having the columns is a structural requirement, while visibility information determines whether execution can actually skip the heap. An Index Only Scan label alone does not prove zero table access. ...

October 14, 2027 · 4 min · XB Field Notes