Symptom → cause → numbered fix. Every outcome names the dependencies to check and when to escalate. Jump into any area, or search above for a specific code.
Copy-paste diagnostics for "what's happening right now." Comments say where to run each and what healthy looks like. All read-only unless flagged.
Don't assume a version or a platform — SELECT version(); shows both. The signals below tell you whether replication is healthy, degraded, or an emergency.
| Signal | Where | Healthy | Trouble |
|---|---|---|---|
| Replication lag | pg_stat_replication | seconds / near zero | growing = standby falling behind |
| Replication slots | pg_replication_slots | active, low retained WAL | inactive slot = WAL piling up → disk-full |
| Standby role | pg_is_in_recovery() | true on the standby | false on intended standby = promoted / split |
| WAL archiving | pg_stat_archiver | last_archived ≈ now, 0 failed | failed_count rising = archive dest problem |
| Recovery conflicts | pg_stat_database_conflicts | near zero | rising = tune hot_standby_feedback / max_standby_streaming_delay |
Versions & platform — don't assume: covers PG 12–16. Breakpoints that bite: PG13 improved index vacuum; PG14 pipeline mode + vacuum gains; PG16 logical-replication & monitoring improvements. Config lives in postgresql.conf on self-managed (reload) vs a parameter group on RDS/Aurora (some settings need a reboot). Data dir, pg_wal and pg_hba.conf paths differ by OS and are managed for you on RDS — you can't shell in.
Field Kit — offline PostgreSQL & RDS incident triage · a ReliabilityOps tool by Grand Canyon Computers. Built from vetted references for PostgreSQL 12–16; confirm against your version and your site's runbook before acting on production. Nothing on this page calls the network; your inputs never leave the browser.