58030
PostgreSQLERRORCommonSystem ErrorHIGH confidence

I/O error

Production Risk

Critical: disk I/O errors can cause database files or WAL to be corrupted, leading to data loss.

What this means

SQLSTATE 58030 is raised when Postgres encounters an I/O error reading from or writing to the filesystem — typically a disk failure, full disk, or filesystem corruption. This is a serious error that may indicate hardware problems.

Why it happens
  1. 1Disk hardware failure causing read/write errors
  2. 2Filesystem corruption
  3. 3NFS or network storage disconnection causing I/O failures
  4. 4Operating system I/O error when accessing data files or WAL
How to reproduce

Disk failure during a database write.

expected output

ERROR:  could not read from file "pg_wal/0000000100000001": Input/output error

Fix 1

Check disk health with SMART diagnostics and repair or replace the disk

WHEN When 58030 is caused by hardware failure.

Why this works

Run smartctl or the storage vendor diagnostic tools to assess disk health. If errors are found, replace the disk and restore from backup.

Fix 2

Check available disk space

WHEN When the I/O error may be caused by a full disk.

Check available disk space
SELECT pg_size_pretty(pg_database_size(current_database()));

Why this works

A full disk causes write failures. Free space or expand storage, then investigate why disk usage grew unexpectedly.

What not to do

Continue running Postgres on a disk showing I/O errors

I/O errors indicate storage hardware problems; continuing risks data corruption.

Sources
Official documentation ↗

Class 58 — System Error

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All PostgreSQL errors