Title card with connected panels labeled OBSERVE, DECIDE, and ACT.

Postgres JSONB pairs with GIN for flexible queries

A PostgreSQL JSONB column can hold documents with different shapes, but efficient querying still requires a precise contract between the predicate and the index. A GIN index on the whole document supports particular JSONB operators. It does not automatically accelerate every expression that extracts a field from that document. ...

July 28, 2027 · 5 min · XB Field Notes
Title card with connected panels labeled OBSERVE, DECIDE, and ACT.

A Postgres index lives to answer a query

An index is valuable because it changes the work needed by a real query. Counting indexed columns is not a useful success measure. A narrow B-tree that finds one customer’s newest three orders can outperform a wider structure that cannot supply the needed ordering, while a query reading almost every row may correctly ignore both. Evaluate access, ordering, and result volume together. ...

July 20, 2027 · 5 min · XB Field Notes
Title card with connected panels labeled OBSERVE, DECIDE, and ACT.

EXPLAIN shows how Postgres will do the work

EXPLAIN prints the planner’s proposed execution plan; EXPLAIN ANALYZE executes the statement and adds measured rows and times. A slow query needs both a hypothesis and a measurement. Save the query parameters, PostgreSQL version, and original plan before changing an index or rewriting a join. Those details make the next plan comparable and prevent an improvement on one input from hiding a regression on another. ...

July 8, 2027 · 5 min · XB Field Notes
Continuous WAL archiving that enables exact-moment restore.

Postgres WAL archiving reaches point-in-time recovery

Point-in-time recovery starts with a valid physical base backup and replays the WAL required to reach a chosen recovery target. The target must fall within the recoverable history of that backup and its available timelines. Archiving does not create the ability to recover to arbitrary earlier dates, nor does it repair a gap between the backup and the desired endpoint. ...

June 25, 2027 · 6 min · XB Field Notes
Title card with connected panels labeled OBSERVE, DECIDE, and ACT.

hstore holds a flexible key-value map in a column

The hstore extension stores a flat map of text keys to text values, including nullable values. It can fit optional descriptive attributes whose shape varies between rows. That flexibility does not remove the need to define important keys, validate values, and choose indexes from actual predicates. Access flags, prices, and credentials deserve deliberate modeling rather than being hidden among supposedly harmless metadata. ...

June 16, 2027 · 5 min · XB Field Notes
Title card with connected panels labeled OBSERVE, DECIDE, and ACT.

Vacuum reclaims versions after the visibility horizon

An update creates a new PostgreSQL row version, and a delete makes an existing version invisible to later snapshots. Neither operation means every older transaction has finished using that version. Ordinary vacuum, including work started by autovacuum, must respect that visibility horizon before reclaiming storage. Scheduling more cleanup cannot override a reader’s legitimate snapshot. ...

June 4, 2027 · 4 min · XB Field Notes
Title card with connected panels labeled OBSERVE, DECIDE, and ACT.

A plain read keeps its statement snapshot

In PostgreSQL Read Committed, an ordinary table read uses a snapshot established for that statement. Another transaction can commit while the read is running, yet the table scan continues using its original visibility boundary. The next statement can see the new commit. This explains how one transaction can obtain individually consistent answers that differ between statements, without either statement observing an uncommitted intermediate update. ...

May 31, 2027 · 5 min · XB Field Notes
Title card about UNLOGGED data, reduced WAL and crash loss, with Observe, Decide and Act panels.

UNLOGGED table contents trade crash recovery for less WAL

An unlogged PostgreSQL table keeps normal SQL transaction behavior while giving up crash recovery for its contents. It is useful for reproducible staging data, but a committed row is not guaranteed to survive a server crash. The distinction is between clean operation and recovery after an unclean shutdown, not between ordinary queries and every restart. ...

May 24, 2027 · 5 min · XB Field Notes