| From: | Nathan Bossart <nathan(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix autovacuum's database sorting. |
| Date: | 2026-07-31 15:35:59 |
| Message-ID: | E1wppHD-0000000170u-2alL@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix autovacuum's database sorting.
When db_comparator() was updated to use pg_cmp_s32(), the arguments
were listed in the wrong order. This caused autovacuum to sort the
databases by their scores in ascending order instead of descending
order. To fix, swap the arguments to pg_cmp_s32().
Oversight in commit 3b42bdb471.
Reported-by: Хамидуллин Рустам <r(dot)khamidullin(at)postgrespro(dot)ru>
Author: Хамидуллин Рустам <r(dot)khamidullin(at)postgrespro(dot)ru>
Discussion: https://postgr.es/m/5c5a7984-b149-b505-7ad9-2a7766c65b55%40postgrespro.ru
Backpatch-through: 17
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/4cc49cb70396e5a0941eabbe9b23f9c4a3b85c3a
Modified Files
--------------
src/backend/postmaster/autovacuum.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2026-07-31 15:57:54 | pgsql: Prevent walsummarizer from getting stuck at a timeline switch. |
| Previous Message | Nathan Bossart | 2026-07-31 14:57:53 | pgsql: Remove code for pre-v10 servers from AdjustUpgrade.pm. |