Avoid division-by-zero when calculating autovacuum MXID score.
Nathan Bossart <nathan@postgresql.org>
Avoid division-by-zero when calculating autovacuum MXID score. In some cases, effective_multixact_freeze_max_age can be 0, which presents a division-by-zero hazard for the multixact ID age score calculation. To fix, bump it to 1 in that case so that we use the multixact ID age as the score. While at it, also document that this component score scales due to high multixact member space usage. Reported-by: Masahiko Sawada <sawada.mshk@gmail.com> Author: Sami Imseih <samimseih@gmail.com> Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Discussion: https://postgr.es/m/CAD21AoC6nKeYAjTvJ9dmBea03GZK9222h_O%3DONmcVuxfyO88Bg%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/maintenance.sgml | modified | +4 −2 |
| src/backend/postmaster/autovacuum.c | modified | +8 −3 |
Discussion
- mxid_score can become Infinity in pg_stat_autovacuum_scores 10 messages · 2026-06-12 → 2026-06-18