Replication, point-in-time recovery, promotion, connection limits, and the version-upgrade surprises that only ever show up under production traffic.
PostgreSQL is the database I have used longest — since 2017 — and still my default for transactional systems. Most of what I know about it comes from the operational side rather than the query side: how far behind a standby actually falls under write pressure, point-in-time recovery you have rehearsed instead of documented, promotion while traffic is still arriving, connection limits meeting an application that opens a pool per worker, and major-version upgrades. On my failover rig, PostgreSQL 18 streaming replication held a replay lag of 383 µs — measured on the rig, not quoted from a release note.
A decision guide from production projects and measured labs: when one managed Postgres will do, when to shard with Citus, when ClickHouse, Trino or Iceberg fit.
Three LLMs wrote SQL for one customer, told to stay in that account. Asked for others' data, they leaked 23 times in 120; run as the customer's role, never.
At the product's peak write rate, 3 of 35 long reports finished on a Postgres read replica. A replica for reports alone, with a longer delay, ran them all.
PostgreSQL
9 min read
Read the essay
EssayReference systems, measuredMeasured on my own hardware
Draining a Citus worker and removing it straight away left cleanup records for a node that no longer existed. A later rebalance retried one move 33 times.
Distributed databases
PostgreSQL
11 min read
Read the essay
EssayReference systems, measuredMeasured on my own hardware
Wire pgBackRest into a Patroni cluster with Ansible over mutual TLS, then prove it: full backup, replica rebuilt from the repo, point-in-time restore (PITR).
PostgreSQL
Distributed databases
~90 min on an existing cluster; the restore drill itself is ~15 min
Read the tutorial
TutorialRHEL 8 Postgres lab on Apple SiliconFollow-along runbook
Build a two-node Patroni cluster on Rocky 8 under QEMU, then SIGKILL the leader and measure the promotion, the timeline bump, and the pg_rewind rejoin.
PostgreSQL
Distributed databases
~2–3 h first bring-up (TCG is slow); ~5 min for the failover itself
Read the tutorial
TutorialRHEL 8 Postgres lab on Apple SiliconFollow-along runbook
Stand up a dedicated pgBackRest repository host running the TLS server on RHEL 8, with Ansible-issued certs, then prove server-ping and mTLS from a client VM.
amd64 Vagrant boxes on Apple Silicon with QEMU and socket_vmnet, and why a lab that boots still fails host and mesh ping on aarch64 boxes or the Wi‑Fi subnet.
Self-hosted ops
PostgreSQL
~60–90 min first bring-up (TCG is slow)
Read the tutorial
TutorialThe failover labMeasured on my own hardware
PostgreSQL 18's Docker image wants the volume at /var/lib/postgresql, PGDATA in 18/docker, so 12–17 compose files break. The fix, replication and PITR.
PostgreSQL
~35 min hands-on
Read the tutorial
TutorialThe failover labMeasured on my own hardware
Six database engines, eight failover scenarios, one 8-CPU Docker rig. The results matrix, the headline measurements, and how to run the first scenario.