PostgreSQL PANIC / 53100: could not write to file pg_wal: No space left on device

Unconsumed replication slot or failing `archive_command` retained WAL segments until disk filled.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: PostgreSQL PANIC / 53100 Platform: PostgreSQL
Common Root Causes:
  • Unconsumed replication slot or failing `archive_command` retained WAL segments until disk filled.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Drop abandoned inactive replication slots and set `max_slot_wal_keep_size`.
Safe Diagnostic Command:
SELECT slot_name, active, pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn)) FROM pg_replication_slots;
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

Unconsumed replication slot or failing `archive_command` retained WAL segments until disk filled. Recommended diagnostic: `SELECT slot_name, active, pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn)) FROM pg_replication_slots;`. Remediation: Drop abandoned inactive replication slots and set `max_slot_wal_keep_size`.

Worked Examples

  • Run `SELECT slot_name, active, pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn)) FROM pg_replication_slots;` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-pg-53100-disk-full-wal · Independently verified: 2026-11-25

Related Resources