Logging Checkpoints

From PostgreSQL wiki
Jump to navigationJump to search

Checkpoints are very disrupting to your database performance and can cause connections to stall for up to a few seconds while they occur. Starting in PostgreSQL 8.3, you can get verbose logging of the checkpoint process by turning on log_checkpoints. In earlier versions, you can't get much information, but it is possible to get a log message for every checkpoint by setting checkpoint_warning to a higher value, like its maximum of 3600 (seconds). This will produce a warning in the log every time a checkpoint is done. If you have connection backed up behind the checkpoint, they should complete in a bunch just after the checkpoint does. See Checkpoints and the Background Writer for information about reducing the scale of this problem.