Disk usage is the storage capacity occupied by a PostgreSQL data directory, WAL volume, or filesystem. Failing to track it creates a predictable operational risk: a full data disk can block ordinary database activity, while a full WAL disk can prevent journaling and commits and may force PostgreSQL to shut down. section 7.1
The tempting emergency fix
Deleting old rows may not immediately free operating-system space. PostgreSQL must write WAL for each change, and MVCC leaves dead rows that require VACUUM. Ordinary VACUUM marks space reusable inside table files; it does not return that space to the operating system. VACUUM FULL can relinquish storage, but emergency cleanup still requires available capacity. section 7.1
Reduce the risk of disk exhaustion by:
- Monitoring database and WAL volumes continuously, with alerts set well before the panic threshold. section 7.1.3
- Checking manually for unusual growth before alerts trigger, since some filesystems lose performance near capacity. section 7.1.3
- Separating database files and WAL across volumes, and using tablespaces to control object placement or create temporary storage capacity. section 7.1.3
ERROR: could not extend file "base/12609/16048": No space left on device HINT: Check free disk space.
Recognize the operational failure signature produced when PostgreSQL cannot extend a file because the device has no space left. section 7.1
