agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Fix scaling of autovacuum freeze scores.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix scaling of autovacuum freeze scores.
@ 2026-09-01 20:21  Nathan Bossart <nathan@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Nathan Bossart @ 2026-09-01 20:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix scaling of autovacuum freeze scores.
@ 2026-09-01 20:21  Nathan Bossart <nathan@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Nathan Bossart @ 2026-09-01 20:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-09-01 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-01 20:21 pgsql: Fix scaling of autovacuum freeze scores. Nathan Bossart <nathan@postgresql.org>
2026-09-01 20:21 pgsql: Fix scaling of autovacuum freeze scores. Nathan Bossart <nathan@postgresql.org>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox