SQLSTATE 58030 PANIC Class 58: System Error

io_error could not write block N in file “…” — 58030

PostgreSQL error “could not write block N in file … — 58030” (SQLSTATE 58030): 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 wrote fewer bytes than expected for a data block — a short write, often because the disk is full or failing. PostgreSQL raises SQLSTATE 58030 (io_error).

  • A block write completed only partially.
  • Often a full disk or failing storage.
  • Risks data durability/consistency.

What the server log shows

ERROR:  could not write block 12345 in file "base/16384/24576": wrote only 4096 of 8192 bytes

Why PostgreSQL raises this — what the manual says

As Section 28.6 WAL Internals explains:

A write of a specific block to the relation or WAL file failed, usually due to a full filesystem or an I/O error on the underlying device, leaving the page unable to be persisted.

Data files are written in fixed 8 KB pages. A short write (fewer bytes than a page) means the storage couldn’t accept the full block — usually a full or failing disk — so PostgreSQL reports 58030.

Common causes

  • The filesystem is full (no space for the block).
  • Failing disk/controller dropping writes.
  • A quota or volume limit reached.

How to fix it

  1. Free or extend disk space urgently.
  2. Investigate storage/hardware health.
  3. Add disk-usage monitoring and alerts.

Related & next steps

Reference: PostgreSQL 18 Section 30.5 “WAL Internals”.

Was this helpful?