Fix scaling of autovacuum freeze scores.
Sufficiently large settings of the *_freeze_score_weight parameters
can lower the scaling thresholds below the *_freeze_max_age
settings. This can lead the scoring code to raise a value < 1.0 to
a power > 1.0, thus lowering the score, which is the opposite of
what is intended. To fix, only exponentiate the scores when doing
so won't lower their values.
Oversight in commit d7965d65fc.
Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: Greg Burd <greg@burd.me>
Discussion: https://postgr.es/m/apWcbq91BAfhmsKU%40nathan
Backpatch-through: 19
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/49e098b41420aebda60804410b33fcbb5279503f
Modified Files
--------------
src/backend/postmaster/autovacuum.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)