Production Checklist, Decision Maps, SQL Reference, and Glossary
Production PostgreSQL expertise is the ability to make and verify context-specific decisions across correctness, access, performance, change, recovery, and AI quality. This reference condenses the book into release gates, decision paths, essential commands, and shared vocabulary. It is a starting checklist, not a substitute for workload evidence, current documentation, or rehearsed operations.
What will you be able to do?
Review a PostgreSQL system before production change.
Navigate common architecture decisions without defaulting to fashionable complexity.
Recall essential SQL and psql operations safely.
Build a continuing-learning and drill program.
Production-readiness checklist
Correctness and model
Every table has a row predicate, key, owner, lifecycle, and tenant scope.
Durable invariants have constraints or tested transactional enforcement.
Time, money, null, collation, case, and delete semantics are explicit.
Derived data has canonical source, versions, reconciliation, and rebuild.
Security and governance
Runtime roles do not own objects; grants and defaults are reviewed.
RLS/query scope is tested as actual roles with negative canaries.
Values are parameterized; dynamic syntax is allowlisted.
TLS, secrets, logging, retention, erasure, audit, and admin access are tested.
Performance and capacity
Top query fingerprints have representative plans and SLOs.
Indexes have query owners, measured value, and write/storage cost.
Pool budget includes replicas, workers, deploys, admin, and failover.
Vacuum, WAL, checkpoints, slots, disk, table/index growth, and skew are monitored.
Change and recovery
Migrations are backward-compatible, bounded, rehearsed, observable, and reversible until cutoff.
Backups are encrypted/retained/monitored and restores meet RPO/RTO.
HA includes quorum, fencing, routing, validation, and rejoin.
Upgrade, disk-full, pool exhaustion, bad migration, and failover runbooks are drilled.
AI-native data systems
Sources, chunks, embeddings, prompts, models, policies, datasets, and evaluators are versioned.
Authorization occurs before lexical/vector ranking and covers caches/citations/traces.
Exact baselines quantify approximate recall; hybrid/rerank choices are evaluated.
Tools are semantic, typed, least-privileged, idempotent, approved, and audited.
Quality, security, latency, cost, drift, fallback, deletion, restore, and rebuild have gates.
Decision maps
Do you need another data system?
Name the failing SLO or required capability.
Prove query/schema/index/config/capacity fixes are insufficient.
Test PostgreSQL extension/partition/replica options.
Quantify synchronization, consistency, security, backup, skill, and cost of the new system.
Adopt only if measured benefit exceeds permanent operational complexity.
Do you need an agent?
Can a deterministic query/workflow solve it? Use that.
Can a model select from typed tools? Bound it.
Does open-ended planning add measured value? Sandbox and evaluate.
Does any action affect money, access, people, deletion, or external communication? Require policy/human approval.
Which consistency control?
single-row invariant → constraint or atomic conditional statement;
known row workflow → FOR UPDATE or version check;
cross-row invariant → redesign, explicit locks, exclusion/unique constraint, or serializable;
external effect → outbox plus idempotent consumer;
long model work → proposal/job state outside transaction, short revalidation commit.
Essential psql and SQL reference
text
\conninfo \l \dn \dt schema.* \d+ schema.table \du \df
\x auto \timing on \h COMMAND \? \i file.sql \q
RPO/RTO: allowable data loss / allowable recovery time.
WAL: write-ahead log used for durability, recovery, and replication.
Why does this matter in AI-native systems?
AI increases the number of derived artifacts, dynamic queries, external calls, and probabilistic decisions. The checklist keeps durable truth, authorization, recovery, and evidence ahead of model fluency. It also prevents “AI-native” from becoming permission to bypass proven database engineering.
Prove continued mastery
Run a quarterly cycle: one restore, one failover or continuity drill, one migration rehearsal, one tenant/red-team suite, one query-plan review, one AI regression comparison, and one architecture simplification review. Record evidence, owners, findings, and completed improvements.
Common mistakes
Checklist marked from documentation: no observed evidence → link every claim to a test, plan, metric, or drill.
Complexity only grows: no removal review → retire unused indexes, projections, tools, and systems.
Docs become stale: version/provider changes ignored → assign review dates and owners.
AI Pair-Programmer Prompt
text
Use this book's production checklist to conduct an evidence audit. For every claimed
control, ask for the exact test, role, plan, metric, restore, drill, evaluation, owner,
and review date. Separate facts from assumptions and hard gates from preferences.
Recommend the smallest reversible next experiment; do not mark an item complete from
documentation alone.
Hands-on exercise
Score one real or designed PostgreSQL system from 0 (missing) to 3 (drilled) across the five checklist groups, then choose the three highest-risk gaps.
Acceptance criterion: priorities combine impact, likelihood, detectability, recovery difficulty, and dependency—not ease or novelty.
Knowledge check
When should another database/search system be added?
What is the strongest checklist evidence?
What is the final expert habit?
Answers
After a measured requirement exceeds simpler PostgreSQL options and added operational cost is justified.
A reproducible observed test or drill under relevant conditions.
Continuously state assumptions, measure, falsify, recover, document, and simplify.