Diagnostic Queries
Symptoms
Hot standby could not be enabled because there is insufficient free space in pg_wal (formerly pg_xlog) to operate safely. PostgreSQL warns (SQLSTATE 01000).
- Hot standby is unavailable due to WAL space pressure.
- Connections to the standby for queries are refused/limited.
- Often paired with archiving or replay falling behind.
What the server log shows
WARNING: hot standby is not possible because of insufficient free space in pg_wal
Why PostgreSQL raises this — what the manual says
Section 26.4.1 User’s Overview:
“It is not possible to enable hot standby when reading WAL written during a period when wal_level was not set to replica or logical on the primary.”
Hot standby needs room in pg_wal to buffer and replay incoming WAL while serving read-only queries. When that space is too low, PostgreSQL cannot safely enable hot standby and warns (01000).
Common causes
pg_walvolume nearly full on the standby.- WAL replay or archiving falling behind, accumulating segments.
- Undersized WAL storage for the workload.
How to fix it
- Free or expand
pg_walstorage on the standby. - Resolve replay/archiving lag so WAL segments are recycled.
- Tune
max_wal_sizeand monitor WAL disk usage.
Related & next steps
Reference: PostgreSQL 18 Section 27.4 “Hot Standby”.
Thanks — noted. This helps keep the database accurate.