ERROR: could not extend file "base/…": No space left on device
The disk holding the PostgreSQL data directory (or WAL) is full.
Seen on:
PostgreSQL
Meaning
Writes fail immediately; if WAL can’t be written PostgreSQL may shut down. Old WAL from inactive replication slots and bloated tables are common culprits.
Common causes
- Data volume full
- WAL retained by an inactive replication slot
- Large temp files from sorts
- Logs on the same disk
⚡ Quick fix
- Free space/extend the volume
- Drop unused replication slots
- VACUUM FULL/pg_repack bloated tables (needs space)
- Move logs elsewhere
Detailed fix by platform
PostgreSQL
SELECT slot_name, active, pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn)) FROM pg_replication_slots;
How to diagnose
- Disk — df -h on data/WAL volume
- WAL — Retained by slots?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026