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 <[email protected]>
Reviewed-by: Greg Burd <[email protected]>
Discussion: https://postgr.es/m/apWcbq91BAfhmsKU%40nathan
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1bda0b23bce47ab19d518ba51b26b9caed967782

Modified Files
--------------
src/backend/postmaster/autovacuum.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Reply via email to