pgsql-hackers
❮
[PATCH] Add monitoring guidance to replication slot documentation
- Jump to comment-1Venkat Venkatakrishnan<tvvraghavan@gmail.com>Jan 25, 2026, 10:42 AM UTCHello PostgreSQL developers,
I'm submitting a documentation improvement for Section 26.2.6 (Replication
Slots) based on my experience as a database architect managing PostgreSQL
high-availability environments.
# Problem
The current documentation warns that replication slots "can cause the
server to retain so many WAL segments that they fill up the space allocated
for "pgwal" and mentions "maxslotwalkeep_size" as a mitigation.
However, it doesn't provide guidance on what DBAs should monitor to detect
this condition before it becomes critical.
In production environments, the database engineers need to know what
metrics to watch, not just how to limit the problem after the fact.
# Solution
This patch adds specific monitoring recommendations immediately after the
warning, including:
- Disk space monitoring for pg_wal directory
- Replication lag metrics from pgstatreplication (writelag, flushlag,
replay_lag)
- Slot status checks from pgreplicationslots (active flag, restart_lsn)
This gives the database engineers actionable information they can use to
set up proactive monitoring and alerting.
# Background