A lexeme branches to main-index and pending-list blocks, and both arrows converge on a candidate-row block.

GIN indexes speed up full-text and multi-value search

A GIN index stores searchable keys extracted from values and maps those keys to rows. Full-text documents, arrays, and JSONB can all use this access method, but each indexed expression needs an appropriate operator class. GIN is a family of supported searches, not one index that automatically accelerates unrelated columns, data types, or predicates. ...

May 15, 2027 · 5 min · XB Field Notes
The stored email User42@example.test stays unchanged while lower(email) supplies the index key user42@example.test. Keys are computed at creation and maintained on inserts and applicable updates.

A function index precomputes a value at write time

An expression index stores the result of a computation as an index key. A query comparing lower(email) can search those precomputed keys instead of evaluating lower over every table row. This moves work into index creation and maintenance. It does not change the stored email, guarantee that every query uses the index, or make every textual variation a different expression. ...

May 5, 2027 · 4 min · XB Field Notes
The selective source plan repeats a 100-row inner bitmap path three times. The broad plan builds a hash from 500 customers and probes with 50000 purchases.

Joins pick a strategy from the sizes both sides bring

A join strategy connects two input streams; it is not a permanent property of the SQL text. Restricting one side to three customers can make indexed repeated lookups attractive, while joining every purchase may favor scanning once and building a hash table. PostgreSQL chooses among legal alternatives using estimated work, available access paths, ordering, and memory expectations. Table size matters, but the size after filtering matters more than a table’s name or reputation. ...

May 1, 2027 · 4 min · XB Field Notes
Unknown status in a generic plan cannot prove open-only membership. A custom plan knowing open, or a generic query with literal open, can consider the partial index. Eligibility does not guarantee selection.

A partial index stores only the rows that matter

A partial index can keep a frequently queried subset of rows in a smaller structure. An index on job id WHERE status is open is a useful candidate when open jobs are rare and most requests target them. Its availability depends on what the planner can prove about each query, not merely on whether the application happens to pass “open” during one execution. ...

April 27, 2027 · 5 min · XB Field Notes
A populated view holds two solid row bars; WITH NO DATA points to a crossed empty block, and a separate normal-refresh return path repopulates it.

A materialized view stores a query's result for reuse

A materialized view stores the result of a defining query so later reads can access those stored rows. It moves computation from every read into refresh operations, which can benefit repeated reporting queries. The tradeoff is an explicit freshness boundary and another relation to maintain; neither instant reads nor automatic synchronization with the source tables is guaranteed. ...

April 26, 2027 · 5 min · XB Field Notes
Completed WAL segments reach the archive only when preservation succeeds. A nonzero archive result causes retry and local retention, while identical and conflicting repeats require different outcomes.

WAL archiving preserves a recoverable history

Continuous WAL archiving preserves completed log files outside PostgreSQL’s active WAL directory. Together with a suitable base backup and an uninterrupted recovery chain, those files let recovery replay logged database changes to a covered target. Archiving is separate from ordinary commit acknowledgment: a transaction can commit while its WAL segment is still open or while the archive destination is unavailable. ...

April 22, 2027 · 6 min · XB Field Notes
Allocated one, two and three sit above stored one and three; a red cross replaces the stored-two position after rollback.

A sequence allocates numbers independently of rollback

A PostgreSQL sequence allocates numbers independently of whether the caller’s transaction eventually commits. That makes ordinary identifier generation practical under concurrency, but it also makes gaps normal. A sequence number describes an allocation; it does not prove that a row exists, that a transaction committed, or that every smaller number has been used. ...

April 12, 2027 · 5 min · XB Field Notes
With ICU und-u-ks-level2 and deterministic=false, a equals A, b equals B, and á remains distinct. Equality affects uniqueness without rewriting stored text.

Collation decides how strings compare and sort

Text order is part of a query’s contract. A list sorted using byte order can differ from one sorted using linguistic rules, and a case-insensitive comparison can change which names a uniqueness rule considers duplicates. PostgreSQL supports database defaults as well as column and expression collations, so behavior should be made explicit where it affects business identity or pagination. ...

April 4, 2027 · 5 min · XB Field Notes