SQLSTATE 53100 ERROR Class 53: Insufficient Resources

disk_full could not write to file “…”: No space left on device — 53100

PostgreSQL error “could not write to file …: No space left on device — 53100” (SQLSTATE 53100): what it means, common causes, and how to fix it.

PG 9.6, 10, 11, 12, 13, 14, 15, 16, 17, 18 Official docs
Last reviewed Jun 2026 Grounded in source

Diagnostic Queries

Symptoms

PostgreSQL could not write a file because the filesystem is full. PostgreSQL raises SQLSTATE 53100 (disk_full).

  • A write failed with “No space left on device”.
  • Common when WAL, temp files, or the data directory fill the volume.
  • Writes and checkpoints stall until space is freed.

What the server log shows

ERROR:  could not write to file "base/16384/24576": No space left on device

Why PostgreSQL raises this — what the manual says

As Section 28.6 WAL Internals explains:

A write failed because the filesystem holding pg_wal or the data directory ran out of space; WAL must be written before transactions can commit, so the server stops accepting writes until space is freed.

PostgreSQL must write heap, index, WAL, and temp files to disk. When the underlying filesystem has no free space, writes fail and PostgreSQL reports 53100; a full WAL volume can halt the server entirely.

Common causes

  • WAL accumulation (unconsumed replication slots, archiving lag).
  • Large temporary files from heavy sorts/hashes.
  • Bloat or unbounded data growth filling the data volume.

How to fix it

  1. Free space urgently (remove old logs/temp; extend the volume).
  2. Investigate WAL growth: stuck replication slots, failing archive_command.
  3. Add monitoring/alerts on disk usage; cap temp usage with temp_file_limit.

Related & next steps

Reference: PostgreSQL 18 Section 30.5 “WAL Internals”.

Was this helpful?