Add FLUSH_UNLOGGED option to CHECKPOINT command.
authorNathan Bossart <[email protected]>
Fri, 11 Jul 2025 16:51:25 +0000 (11:51 -0500)
committerNathan Bossart <[email protected]>
Fri, 11 Jul 2025 16:51:25 +0000 (11:51 -0500)
commit8d33fbacbac93ed70757ea47cd8a4b4fae61528a
tree686537ac3a6740bca6b7739ec0de78d30a6c13c4
parent2f698d7f4b7b4c49c3649b2fcc063eb66f9d2e6c
Add FLUSH_UNLOGGED option to CHECKPOINT command.

This option, which is disabled by default, can be used to request
the checkpoint also flush dirty buffers of unlogged relations.  As
with the MODE option, the server may consolidate the options for
concurrently requested checkpoints.  For example, if one session
uses (FLUSH_UNLOGGED FALSE) and another uses (FLUSH_UNLOGGED TRUE),
the server may perform one checkpoint with FLUSH_UNLOGGED enabled.

Author: Christoph Berg <[email protected]>
Reviewed-by: Laurenz Albe <[email protected]>
Reviewed-by: Fujii Masao <[email protected]>
Reviewed-by: Dilip Kumar <[email protected]>
Discussion: https://postgr.es/m/aDnaKTEf-0dLiEfz%40msg.df7cb.de
doc/src/sgml/ref/checkpoint.sgml
src/backend/postmaster/checkpointer.c
src/bin/psql/tab-complete.in.c
src/test/regress/expected/stats.out
src/test/regress/sql/stats.sql