postgres-drop-stale-replication-slot
Drop a replication slot that is pinning WAL and filling the disk, after confirming nothing is consuming it.
Procedure
- start start. Goes next to s1
- check Confirm the slot is inactive. Goes on_fail to s9; next to s2
- escalate Escalate to the database owner. Terminal
- action Drop the replication slot, DEL (destructive), requires approval. Goes rollback to s4; next to s3
- check Confirm WAL is releasing. Goes on_fail to s4; next to __end_success
- action Recreate the replication slot, RW (reversible-write). Goes next to __end_aborted
- end success. Terminal
- end aborted. Terminal
Open the graph on its own page — larger, printable, and an address you can send.
Walk it without running it — you answer what your environment would answer, and the path, the capabilities, the approvals and the distance back to an undo come out of the document. Nothing executes; there is no Run button here and there will not be one.
Trust
T2 · attested 2026-10-11 · runbooks.directory
Nobody has attested this record. That is the ordinary case: T2 is what the catalog can check on its own, and T3 needs somebody to run the procedure and sign for it.
- Link liveness has not been checked: it needs a network and the catalog builds without one. Run
pnpm gates --onlinewhere there is one.
Steps
s1check — Confirm the slot is inactives2action — Drop the replication slot (destructive) — requires approvals3check — Confirm WAL is releasings4action — Recreate the replication slot (reversible-write)s9escalate — Escalate to the database owner
Capabilities
This is a privilege request. Check it against your own allowlist before running.
-
cli:psql— used by s1, s2, s3, s4
Provenance
- Source
- https://runbooks.directory/r/std/postgres-drop-stale-replication-slot/source.md
- Fetched
- 2026-09-02
- Source last checked
- not since it was captured on 2026-09-02 — recorded as
current - Licence
- CC-BY-4.0
- How it got here
- Written by this catalog's maintainers and reviewed in full.
- Highest risk in this procedure
- destructive
Take it with you
- SKILL.md — the record as an Agent Skills file
- workflow.yaml — Open Workflow DSL 1.0.3, for a runner
- record.json — the catalog's own JSON
- graph.svg — the graph, standalone
Run it under supervision
This procedure contains destructive steps. Run it here, where the supervisor is the thing invoking the commands and therefore sees every one of them: each step is proposed before it happens and a gate stops for you. Nothing about the run leaves this machine.
# destructive steps: every one stops for you before it runs.
npx @runbooks/cli run std/postgres-drop-stale-replication-slot@1.0.0 --as "$(whoami)" \
--input slot=<replication slot name>