Title card with three panels labeled Observe, Decide, and Act.

Materialized answers need freshness and cost budgets

A materialized answer saves repeated computation by storing a query result. The decision is economic and semantic: how much work will reuse avoid, and which source state may readers accept? This article focuses on that budget. PostgreSQL’s native materialized-view lifecycle has additional prerequisites; a stored answer should never acquire a freshness promise merely because its reads are fast. ...

October 16, 2026 · 5 min · XB Field Notes
Title card about query-driven indexes, with generic Observe, Decide, and Act panels linked by arrows.

Indexes serve queries, not algorithms

An index is justified by an access requirement or an integrity rule. The first might be retrieving one customer’s latest five orders; the second might be preventing duplicate order identifiers. Both are real purposes, even if only one appears as a frequent read in query statistics. Index design starts by recording those purposes and measuring their costs, not by accumulating interesting data structures or deleting everything with a low scan count. ...

September 10, 2026 · 5 min · XB Field Notes
An observe-decide-act diagram beside the words Budget every pool, across all replicas.

Connection caps guard a shared database

A connection cap limits one owner’s demand; it does not automatically cap every application sharing a database. The useful budget is the sum of physical connections that can reach each backend, including idle pooled connections. Begin with the backend’s usable slots, then allocate them across all callers and deployment states. ...

September 5, 2026 · 6 min · XB Field Notes
An observe-decide-act diagram beside the words Bound the query, then check recovery.

Query timeouts bound a bad query's cost

A query timeout limits one part of database work. It does not automatically bound connection-pool waiting, cancel remote execution, or finish transaction cleanup. Protecting shared capacity requires knowing which component owns the timer, what that component actually interrupts, and what state remains after the error. ...

September 2, 2026 · 5 min · XB Field Notes
Generic title card with connected boxes labeled OBSERVE, DECIDE, and ACT beside the message: Choose isolation for the invariant.

Choose transaction isolation to preserve the invariant

Choose an isolation level from the invariant an operation must preserve. A stable snapshot is useful, but two transactions can each make a locally reasonable decision that becomes invalid when both commit. PostgreSQL Repeatable Read prevents changes to a transaction’s reading snapshot, yet permits some serialization anomalies. Serializable adds detection that rejects combinations of concurrent work inconsistent with any serial execution, requiring the application to handle retries. ...

August 23, 2026 · 5 min · XB Field Notes
Three connected panels labeled Observe, Decide, and Act alongside the article title.

Cursor pagination continues from a specific boundary

Keyset pagination continues after the last ordering key returned to a client. Instead of skipping a number of rows from the current beginning, it compares each candidate with a concrete boundary. This prevents a new item at the top of a feed from shifting every later page by one position. It does not freeze the dataset or promise that every future request sees the same records. ...

August 19, 2026 · 5 min · XB Field Notes
Title card about vacuum and reusable table space, with Observe, Decide and Act panels.

Vacuum keeps a growing database from bloating

In multi-version storage, deleting a row records the change without immediately freeing the space. Reclaiming that space is maintenance work, and when it is skipped the cost shows up slowly. Deleted does not mean gone An UPDATE or DELETE leaves old PostgreSQL row versions until they are no longer needed by any relevant snapshot. A long transaction can delay that point while other sessions keep changing rows. The transaction alone does not manufacture new bloat in an otherwise idle table. Reclaiming obsolete versions and making their space reusable is distinct from merely committing the delete. ...

August 16, 2026 · 5 min · XB Field Notes
Title card about WAL preceding data-page flushing, with Observe, Decide and Act panels.

WAL makes commit durable before page flushing

Write-ahead logging lets a database make a transaction durable without immediately flushing every table and index page that transaction changed. In PostgreSQL, the log records needed to recover a page must be durable before that page is written to storage. Normal synchronous commit also waits for the commit record to be flushed. Buffered table changes and durable log records therefore advance through different paths. ...

August 14, 2026 · 5 min · XB Field Notes