Runbook category

WAL & replication

Open this category when the cost centre is write-ahead log or a replica, not a single query plan. Disk filling under pg_wal, checkpoint-aligned latency spikes, replication lag that refuses a simple average, or a durability setting you inherited and never measured. WAL is cheap to ignore until it is the only thing the disk is doing.

These runbooks measure instead of guessing. Bytes of WAL generated per workload. What an abandoned or inactive replication slot pins, and how to reclaim it before the volume fills. What wal_compression actually saves, usually less than the blog posts claim. How max_wal_size and checkpoint_timeout turn a flat totals graph into periodic I/O spikes. synchronous_commit traded against commit latency. Unlogged tables that empty on crash. Replication lag as three numbers, not one. hot_standby_feedback and the bloat it quietly buys on the primary.

Vacuum & bloat is the primary-side mess feedback and long horizons leave behind. Observability is how you spot checkpoint pressure and I/O before the disk alert. High availability, what a failover costs, rejoining a demoted primary with pg_rewind, routing writes without a proxy, is a smaller group on the main runbook index rather than a category page of its own, and it answers "what happens when the primary dies" rather than "why is WAL growing." Start here for slots, lag, checkpoints, and write volume.