checkpoint_warning
A configuration parameter specifying the interval to warn about too-frequent checkpoints
checkpoint_warning
is a configuration parameter determining the interval at which to write log messages if checkpoints which are due to WAL file growth occur too frequently.
checkpoint_warning
was added in PostgreSQL 7.4.
Default value
The default value for checkpoint_warning
is: 30s
.
No warnings will be logged if checkpoint_timeout
is less than checkpoint_warning
, or if checkpoint_warning
is set to 0
.
Change history
- PostgreSQL 7.4
- added (commit 2986aa6a)
Examples
Log excerpt from an operation (in this case a bulk data load) which is generating more checkpoints than usual:
[2021-03-29 10:49:29 UTC] LOG: 00000: checkpoint starting: wal ... [2021-03-29 10:49:34 UTC] LOG: 00000: checkpoint complete: wrote 8480 buffers (51.8%); 0 WAL file(s) added, 0 removed, 33 recycled; write=5.037 s, sync=0.001 s, total=5.043 s; sync files=0, longest=0.000 s, average=0.000 s; distance=538195 kB, estimate=538195 kB [2021-03-29 10:49:34 UTC] LOG: 00000: checkpoints are occurring too frequently (5 seconds apart) [2021-03-29 10:49:34 UTC] HINT: Consider increasing the configuration parameter "max_wal_size". [2021-03-29 10:49:34 UTC] LOG: 00000: checkpoint starting: wal ... [2021-03-29 10:49:38 UTC] LOG: 00000: checkpoint complete: wrote 807 buffers (4.9%); 0 WAL file(s) added, 3 removed, 30 recycled; write=3.906 s, sync=0.001 s, total=3.919 s; sync files=0, longest=0.000 s, average=0.000 s; distance=540689 kB, estimate=540689 kB [2021-03-29 10:49:38 UTC] LOG: 00000: checkpoints are occurring too frequently (4 seconds apart) [2021-03-29 10:49:38 UTC] HINT: Consider increasing the configuration parameter "max_wal_size". [2021-03-29 10:49:38 UTC] LOG: 00000: checkpoint starting: wal ... [2021-03-29 10:49:39 UTC] LOG: 00000: checkpoint complete: wrote 384 buffers (2.3%); 0 WAL file(s) added, 3 removed, 30 recycled; write=0.394 s, sync=0.001 s, total=0.430 s; sync files=0, longest=0.000 s, average=0.000 s; distance=549825 kB, estimate=549825 kB [2021-03-29 10:49:39 UTC] LOG: 00000: checkpoints are occurring too frequently (1 second apart) [2021-03-29 10:49:39 UTC] HINT: Consider increasing the configuration parameter "max_wal_size".
References
- PostgreSQL documentation: checkpoint_warning