]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add missing assign hook for GUC checkpoint_completion_target
authorMichael Paquier <michael@paquier.xyz>
Thu, 19 Jan 2023 04:13:34 +0000 (13:13 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 19 Jan 2023 04:13:34 +0000 (13:13 +0900)
commit0c2f34af7e1e908d27eb34c2c3469910e43c1253
tree1ec2c2499c752ef7845b8534ef2e1c24b32518ec
parent145bc5debf6fdcc1546196906ee57ae68d647921
Add missing assign hook for GUC checkpoint_completion_target

This is wrong since 88e9823, that has switched the WAL sizing
configuration from checkpoint_segments to min_wal_size and
max_wal_size.  This missed the recalculation of the internal value of
the internal "CheckPointSegments", that works as a mapping of the old
GUC checkpoint_segments, on reload, for example, and it controls the
timing of checkpoints depending on the volume of WAL generated.

Most users tend to leave checkpoint_completion_target at 0.9 to smooth
the I/O workload, which is why I guess this has gone unnoticed for so
long, still it can be useful to tweak and reload the value dynamically
in some cases to control the timing of checkpoints.

Author: Bharath Rupireddy
Discussion: https://postgr.es/m/CALj2ACXgPPAm28mruojSBno+F_=9cTOOxHAywu_dfZPeBdybQw@mail.gmail.com
Backpatch-through: 11
src/backend/utils/misc/guc.c