PostgreSQL replication slot retained WAL alert


The Replication Slot Retained WAL alert notifies you when its configured condition is met on PostgreSQL instances so you can investigate and respond.

Screenshot pending: Mini DBA PostgreSQL Replication Slot Retained WAL alert screenshot placeholder

Alert summary

  • Platform: PostgreSQL
  • Alert category: Disk
  • Default enabled: true
  • Default evaluation frequency: Minute
  • Threshold label: GB retained
  • Unit: GB

What Mini DBA checks

Mini DBA describes this alert as: Replication slots retaining too much WAL can fill the WAL volume when consumers lag or disappear. Mini DBA evaluates this alert once a minute so changes are detected quickly.

How this alert helps

This alert shows that replication slots are retaining enough WAL to threaten disk capacity, usually because a consumer is lagging, disconnected, or no longer exists.

When to enable it

Enable it where replication, read replicas, failover, or reporting copies are part of the service design. Disable it on standalone systems that do not use replication so the alert list stays focused.

Threshold guidance

Threshold meaning: GB retained. Major threshold: 50 GB. Minor threshold: 10 GB. Comparison direction: over. For an over-threshold alert, decreasing a threshold makes that severity fire sooner; increasing it tolerates more load or pressure. Set the minor threshold as an early-warning level and the major threshold at the highest acceptable value for the service.

Remediation for an active alert

Identify the slot and consumer, restore the consumer or advance or drop an obsolete slot through an approved PostgreSQL procedure, and add temporary disk capacity if needed. Never delete files manually from pg_wal; doing so can make the server unrecoverable.

Investigation workflow

  1. Record the slot name, active state, retained WAL, consumer, restart LSN, and current WAL position.
  2. Confirm whether the consumer is expected, recoverable, lagging, or permanently retired.
  3. Restore consumption or remove the obsolete slot through an approved change, adding temporary capacity when required.
  4. Verify that retained WAL falls and replication or recovery requirements remain satisfied.

Avoiding alert noise

Keep this alert enabled because retained WAL can grow until the volume fills. Set thresholds from available disk headroom and the time needed to repair a consumer or approve slot removal.

Related pages