CRE-2025-0077
PostgreSQL Fails to Extend File Due to Disk FullHighImpact: 9/10Mitigation: 7/10
CRE-2025-0077View on GitHub
Description
PostgreSQL logs an error when it cannot extend a data file (table/index) because
the filesystem is out of disk space. This prevents writes requiring new allocation.
Cause
The disk partition hosting PostgreSQL's data directory (PGDATA) or related tablespaces is full,
often due to data growth, table bloat, or insufficient initial disk allocation.
Mitigation
- Verify Disk Space: Check the disk space usage of the PostgreSQL data directory and tablespaces.
- Free OS-Level Space: Delete non-PostgreSQL files (old logs, temp files) from the full partition.
- Free PostgreSQL Space: If accessible, `TRUNCATE` unneeded tables, `DELETE` old data and `VACUUM`, or `DROP` unused objects. `VACUUM FULL` reclaims more space but needs some free space to run and locks tables.
- Expand Storage: Increase the disk volume size at the OS or cloud provider level.
- Preventative Measures: Implement disk space monitoring with alerts (e.g., >80%), schedule regular `VACUUM` operations, and perform capacity planning.