slotwatch
A read-only terminal tool for tracking WAL retained by PostgreSQL replication slots.
What does it do?
slotwatch periodically reads PostgreSQL replication slots and calculates how much WAL each retains. It shows growth rates from the last few minutes of history, places risky slots at the top, and displays warning reasons and suggested responses in a detail view. A demo mode lets users explore the interface without a database. The --check mode performs a single check and returns a status-dependent exit code for use with cron, CI, or Kubernetes monitoring. It does not delete or modify slots.
Key features
- Shows retained WAL, growth rate, consumer, and idle time for each replication slot.
- Places risky slots at the top and shows warning reasons and suggested responses.
- Uses --demo to explore a virtual server’s slot status without a database.
- Uses --check for a single check, returning a status-dependent exit code of 0~3.
- Only reads slots; it does not delete or modify them.