Wait-event triage map
A decision tree from one pg_stat_activity snapshot to the next safe action.
The map is deliberately conservative: preserve evidence first, separate expected idleness from stalled work, and only then choose a class-specific drill-down.
Minimum evidence bundle
- Two or more snapshots with timestamps.
pid,backend_type,state, query age, transaction age, event type and name.pg_blocking_pids(pid)for every waiting backend.- The exact PostgreSQL major/minor version.
- A workload marker: deploy, batch, checkpoint, vacuum, backup, DDL, or failover.
Warning
Do not terminate a backend merely because its wait is frequent. Activity, many Client, and timer waits can dominate a healthy cluster by design.