What is difference between checkpoint_timeout and checkpoint_completion_target in PostgreSQL?



  • I am MSSQL guy and I find it a bit difficult to understand the main purpose of checkpoint_completion_target. I cannot find a comprehensive resource that would explain more clearly the difference between checkpoint_timeout and checkpoint_completion_target parameters in PostgreSQL.



  • checkpoint_timeout specifies the interval at which checkpoints happen, unless they are triggered by the CHECKPOINT statement or the amount of WAL written (max_wal_size).

    checkpoint_completion_target configures how slow the checkpoint is written. A value of 0.8 would make PostgreSQL write checkpoints slow enough that the current checkpoint is done when 80% of the estimated time to the start of the next checkpoint has passed. Spreading checkpoints as much as possible is a good idea to avoid I/O spikes.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2