Replication Lag
pg_views: pg_stat_replication, pg_replication_slots
Full detection logic, thresholds, and guided fixes ship in the product.
Book a demo →Overview
Replication lag measures how far behind a standby server is from the primary. For streaming replication, insightral tracks write_lag, flush_lag, and replay_lag. For logical replication slots, it tracks the volume of WAL retained on disk waiting to be consumed. Both types of lag matter: streaming lag means reads from the replica are stale, while slot lag means the primary cannot recycle WAL, eventually filling the disk.
An inactive or abandoned replication slot is particularly dangerous because it silently retains WAL indefinitely. insightral flags both lag > 30 seconds on streaming replicas and replication slots retaining > 1 GB of WAL as findings.
See this rule in action
Full detection logic, thresholds, and guided fixes ship in the product. The licensed agent runs this check — and all others — continuously against your database, surfaces findings with AI explanations, and surfaces a guided remediation path inside the dashboard.
Book a demo →Common False Positives
- Expected replica lag during planned maintenance windows where the standby is intentionally paused.
- Logical replication slots used by active Debezium or pglogical instances will always show some retained WAL — the threshold is the concern, not the existence of the slot.
Replication Lag — and 100+ more checks — in the licensed product
Full detection logic, thresholds, and guided fixes ship in the product.
Book a demo →Last updated: 2026-05-13 · View the rule library