I/O waits
IO means PostgreSQL has instrumented a file operation and the backend cannot continue until the kernel or another I/O worker makes progress. It says which PostgreSQL file path is involved; it does not, by itself, prove the storage is slow.
Read event + operation + workload phase
Names usually encode both object and operation: DataFileRead, WalSync, SlruWrite, ReorderBufferRead. Ask whether the workload should be performing that operation now, then compare duration and concurrency with pg_stat_io (PG16+) and operating-system latency.
- Normal: scans read data files, checkpoints sync dirty files, backups read/write, recovery reads WAL.
- Watch: the same foreground I/O event persists in consecutive samples and device latency or query latency rises.
- Urgent: many backends queue behind sync/write completion, errors appear, or the affected path reaches saturation/throttling.
Events to recognize
| Event | First interpretation |
|---|---|
| DataFileRead | Cache miss or scan reading relation data |
| DataFileWrite | Backend/checkpoint path writing relation data |
| DataFileSync | Relation changes are being made durable |
| WalWrite | WAL bytes are being written |
| WalSync | WAL durability boundary is waiting on fsync/fdatasync |
| SlruRead | Transaction-related SLRU page read |
| BuffileRead | Temp/spill file read |
| AioIoCompletion | PG18 AIO work has not completed yet |
PG16+ I/O context
Common misreads
- A high count of
DataFileReadduring an intentional sequential scan can be healthy throughput. WalWriteand LWLockWALWriteare different: one is a file operation, the other internal coordination.- Average device latency can hide a saturated single WAL volume or tail-latency spikes.
- Raising cache size cannot fix every read wait; poor plans and cold one-time scans may simply displace useful pages.
Waiting for another process to complete IO
Waiting for IO execution via io_uring
Waiting for IO submission via io_uring
Waiting for base backup to read from a file
Waiting for data written by a base backup to reach durable storage
Waiting for base backup to write to a file
Waiting for a read from a buffered file
Waiting for a buffered file to be truncated
Waiting for a write to a buffered file
Waiting for a read from the pg_control file
Waiting for the pg_control file to reach durable storage
Waiting for an update to the pg_control file to reach durable storage
Waiting for a write to the pg_control file
Waiting for a write to update the pg_control file
Waiting for a file copy operation
Waiting for a read during a file copy operation
Waiting for a write during a file copy operation
Waiting for a relation data file to be extended
Waiting for a relation data file to reach durable storage
Waiting for an immediate synchronization of a relation data file to durable storage
Waiting for an asynchronous prefetch from a relation data file
Waiting for a read from a relation data file
Waiting for changes to a relation data file to reach durable storage
Waiting for a relation data file to be truncated
Waiting for a write to a relation data file
Waiting for a dynamic shared memory segment to be allocated
Waiting to fill a dynamic shared memory backing file with zeroes
Waiting for a read while adding a line to the data directory lock file
Waiting for data to reach durable storage while adding a line to the data directory lock file
Waiting for a write while adding a line to the data directory lock file
Waiting to read while creating the data directory lock file
Waiting for data to reach durable storage while creating the data directory lock file
Waiting for a write while creating the data directory lock file
Waiting for a read during recheck of the data directory lock file
Waiting for a read from a logical changes file.
Waiting for a write to a logical changes file.
Waiting for logical rewrite mappings to reach durable storage during a checkpoint
Waiting for mapping data to reach durable storage during a logical rewrite
Waiting for a write of mapping data during a logical rewrite
Waiting for logical rewrite mappings to reach durable storage
Waiting for truncate of mapping data during a logical rewrite
Waiting for a write of logical rewrite mappings
Waiting for a read from a logical subxact file.
Waiting for a write to a logical subxact file.
Waiting for a read of the relation map file
Waiting for durable replacement of a relation map file
Waiting for the relation map file to reach durable storage.
Waiting for a write to the relation map file
Waiting for a read during reorder buffer management
Waiting for a write during reorder buffer management
Waiting for a read of a logical mapping during reorder buffer management
Waiting for a read from a replication slot control file
Waiting for a replication slot control file to reach durable storage while restoring it to memory
Waiting for a replication slot control file to reach durable storage
Waiting for a write to a replication slot control file
Waiting for SLRU data to reach durable storage during a checkpoint or database shutdown
Waiting for a read of an SLRU page
Waiting for SLRU data to reach durable storage following a page write
Waiting for a write of an SLRU page
Waiting for a read of a serialized historical catalog snapshot
Waiting for a serialized historical catalog snapshot to reach durable storage
Waiting for a write of a serialized historical catalog snapshot
Waiting for a timeline history file received via streaming replication to reach durable storage
Waiting for a write of a timeline history file received via streaming replication
Waiting for a read of a timeline history file
Waiting for a newly created timeline history file to reach durable storage
Waiting for a write of a newly created timeline history file
Waiting for a read of a two phase state file
Waiting for a two phase state file to reach durable storage
Waiting for a write of a two phase state file
Waiting for the version file to reach durable storage while creating a database
Waiting for the version file to be written while creating a database
Waiting for WAL to reach durable storage during bootstrapping
Waiting for a write of a WAL page during bootstrapping
Waiting for a read when creating a new WAL segment by copying an existing one
Waiting for a new WAL segment created by copying an existing one to reach durable storage
Waiting for a write when creating a new WAL segment by copying an existing one
Waiting for a newly initialized WAL file to reach durable storage
Waiting for a write while initializing a new WAL file
Waiting for a read from a WAL file
Waiting for a read from a WAL summary file
Waiting for a write to a WAL summary file
Waiting for a WAL file to reach durable storage
Waiting for data to reach durable storage while assigning a new WAL sync method
Waiting for a write to a WAL file
Waiting for a read from a timeline history file during a walsender timeline command