Write a message to the server log if checkpoints caused by the filling of WAL segment files happen closer together than this amount of time (which suggests that max_wal_size ought to be raised).
At a glance
| Property | Value |
|---|---|
| Parameter | checkpoint_warning |
| Category | Write Ahead Log |
| Default | 30 |
| Value type | integer |
| Change scope | Reload (postgresql.conf, SIGHUP) |
| Available in | PostgreSQL 12, 13, 14, 15, 16, 17, 18, 19 (added in 12) |
What it does
Write a message to the server log if checkpoints caused by the filling of WAL segment files happen closer together than this amount of time (which suggests that max_wal_size ought to be raised). If this value is specified without units, it is taken as seconds. The default is 30 seconds (30s). Zero disables the warning. No warnings will be generated if checkpoint_timeout is less than checkpoint_warning. This parameter can only be set in the postgresql.conf file or on the server command line.
(Description quoted from the official PostgreSQL documentation.)
How to apply a change
Set it in postgresql.conf (or with ALTER SYSTEM) and reload with SELECT pg_reload_conf(); or pg_ctl reload — no restart needed.
Inspect the current value and source with SHOW checkpoint_warning; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'checkpoint_warning';.
Tuning guidance
Raise the window if you legitimately checkpoint often during bulk loads and want fewer log warnings; lower it to be alerted earlier that checkpoints fire too frequently (raise max_wal_size then).