checkpoint_completion_target
Fraction of the checkpoint interval over which the checkpoint's writes are spread.
- 기본값
0.9- Range
- 0 to 1
- Restart needed
- 아니요
- Default checked on
- PostgreSQL 18
기능
With 0.9, a checkpoint spreads its writes over 90% of the time until the next one is due, which keeps I/O smooth instead of bursting.
기본값
0.9. 0.9 since PostgreSQL 14 (it was 0.5 before). Same in 18.
Check the current value
SHOW checkpoint_completion_target; SELECT setting, unit, boot_val, context, source, pending_restart FROM pg_settings WHERE name = 'checkpoint_completion_target';
Change it
ALTER SYSTEM SET checkpoint_completion_target = 0.9; SELECT pg_reload_conf();
No restart: reload with SELECT pg_reload_conf() or pg_ctl reload. It cannot be changed per session (context is sighup).
When to change it
Rarely now that the default is 0.9. Check it on servers upgraded with an old postgresql.conf that still says 0.5.
What can go wrong
Low values cause write spikes at each checkpoint.
Questions about checkpoint_completion_target
What is the default value of checkpoint_completion_target in PostgreSQL?
0.9. 0.9 since PostgreSQL 14 (it was 0.5 before). Same in 18.
Does changing checkpoint_completion_target require a restart?
No. No restart: reload with SELECT pg_reload_conf() or pg_ctl reload. It cannot be changed per session (context is sighup).
When should I change checkpoint_completion_target?
Rarely now that the default is 0.9. Check it on servers upgraded with an old postgresql.conf that still says 0.5.
Back to all PostgreSQL settings, or check the PostgreSQL manual for every option.
Check checkpoint_completion_target on your own server
SQLly runs the query above against PostgreSQL and the other engines in this reference, from one desktop app on macOS, Windows and Linux.