Reclaim WAL held by an inactive replication slot
An abandoned physical slot retained 32MB of WAL in the PG16.14 lab after a 100,000-row write. Confirm the consumer is gone, then drop the slot so WAL recycling can resume.
Problem
What you're actually looking at
The symptom as it shows up on a real server.
Replication slots stop the primary from recycling WAL a replica or logical consumer still needs. That is exactly what you want for an active consumer, and a disk-filling trap for an inactive one. A dropped replica or a stalled logical consumer leaves a slot that pins WAL indefinitely, and max_wal_size does not override that pin.
Meridian's standby went away but its physical slot remains. The slot is inactive yet still reserving WAL, and pg_wal is steadily filling toward a full disk.
Simple terms
A replication slot is a promise: PostgreSQL will keep the WAL a replica or consumer still needs until it has actually read it. That is exactly what you want for a live consumer, and a disk-filling trap when the consumer goes away. A dropped standby or a stalled logical reader leaves its slot behind, and that inactive slot keeps pinning WAL forever, quietly filling pg_wal toward a full disk. Dropping the dead slot releases the held WAL.
Full runbook for this incident
- The full identify checklist, the exact signals that tell you it's this incident
- Every diagnostic query; lab output is attached only to the steps we actually captured
- The resolution path and the pitfalls that make it worse
- Mitigation steps to stop it recurring, plus a verify-you're-done query
Card required. Cancel before day 7 and you are not charged.
Related runbooks
Continue the same incident path
Sibling procedures that cover the adjacent setup, recovery, or prevention step.
More in this category
Other WAL & replication runbooks
Neighbouring incidents that share the same diagnostic surface.
Connected
How this connects to the rest of the library
A live view of this page's real cross-references, what explains it, what fixes it, what to tune, and where to go next. Every link is an authored relationship, not a guess.
Fixes these errors
Need the full procedure?
Pro runbooks finish the incident path
Free runbooks teach the shape. Pro opens the full step transcript, edge cases, and prevention depth.