Diagnostic Queries
Symptoms
A requested checkpoint did not complete because the server is still performing crash or archive recovery. PostgreSQL reports SQLSTATE 57P03 (cannot_connect_now) context for the unavailable operation.
- A checkpoint was requested during recovery.
- The server isn’t fully available yet.
- Common shortly after a restart/crash.
What the server log shows
ERROR: requested checkpoint not completed because recovery is still in progress
Why PostgreSQL raises this — what the manual says
Section 30.5 WAL Configuration:
“Restartpoints can’t be performed more frequently than checkpoints on the primary because restartpoints can only be performed at checkpoint records.”
While replaying WAL (crash/archive/standby recovery), the server isn’t fully operational and cannot service an on-demand checkpoint the normal way. The request can’t complete until recovery finishes, so PostgreSQL reports it under 57P03.
Common causes
- Issuing
CHECKPOINTbefore recovery has finished. - Connecting right after a crash/restart while WAL replay continues.
- A standby still in continuous recovery.
How to fix it
- Wait for recovery to complete, then retry the checkpoint.
- Monitor recovery progress with
pg_stat_recovery_prefetch/server logs. - On a standby, this is expected — checkpoints are managed by the recovery process.
Related & next steps
Reference: PostgreSQL 18 Section 30.5 “WAL Configuration”.
Thanks — noted. This helps keep the database accurate.