Insights / Tag
#postgres
Engineering · Illustrative scenario
Postgres 25P02: put recovery at the right boundary
An illustrative import accepts a required record and attempts an optional annotation. Decide whether annotation failure invalidates the import before choosing a savepoint.
Engineering · Illustrative scenario
Postgres UPDATE FROM: prove one source row per target
An updated-row count cannot prove that an ambiguous source applied the intended inventory change.
Engineering · Illustrative scenario
Postgres sequence repair: protect the allocation boundary
Diagnose a generated primary-key collision without moving a healthy allocator backwards.
Engineering · Illustrative scenario
Postgres SKIP LOCKED: empty is not drained
Show how a correct claim still produces a false batch-completion decision, then define admission and inventory evidence.
Engineering · Illustrative scenario
Postgres latest row: filter before or after selection?
Show a correct deterministic query that still lies about current health when status is filtered before choosing the latest event.
Cloud · Illustrative scenario
Kubernetes CronJob duplicates: protect the business period
Treat the timer as a reconciliation wake-up; carry tenant-period identity through duplicate execution, commit acknowledgement loss and a conflicting input revision.
Engineering · Illustrative scenario
Postgres LEFT JOIN: keep zero rows and report grain
Carry one tenant report through ON versus WHERE, count non-null keys and a second one-to-many fan-out; prove one row per tenant using result invariants.
Engineering · Illustrative scenario
Postgres NULL uniqueness: define the missing-key rule
Choose whether an absent locale is an unknown draft or the one tenant default, then carry that meaning through duplicate resolution, unique enforcement and upsert behavior.
Engineering · Illustrative scenario
Postgres JSONB indexes: test the rewrite’s meaning
Making a predicate index-compatible can change its answer. Compare typed fixtures before choosing a JSONB access path.
Engineering · Illustrative scenario
Postgres keyset cursors: preserve timestamp precision
Preserve the exact database sort tuple in the cursor, separate display formatting from continuation, and test microseconds as well as ties.
Engineering · Illustrative scenario
Postgres ALTER TABLE: limit the lock queue
A waiting schema change can block later readers. Reconstruct the queue, scope the timeouts and keep the migration transaction short.
Engineering · Illustrative scenario
Postgres too many clients: budget the whole fleet
A worked deployment review: count process-owned pools, preserve operational reserves and reject unsafe rollout or failover commitments before Postgres runs out of slots.