agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix autovacuum's database sorting.
Date: Fri, 31 Jul 2026 15:35:59 +0000
Message-ID: <E1wppHD-0000000170w-2h57@gemulon.postgresql.org> (raw)

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.khamidullin@postgrespro.ru>
Author: Хамидуллин Рустам <r.khamidullin@postgrespro.ru>
Discussion: https://postgr.es/m/5c5a7984-b149-b505-7ad9-2a7766c65b55%40postgrespro.ru
Backpatch-through: 17

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/288d4e83f1dab9fc9744eed7129e4f77d82be7ad

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



view thread (4+ messages)

Message-ID: <E1wppHD-0000000170w-2h57@gemulon.postgresql.org>
Permalink:  ../E1wppHD-0000000170w-2h57@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wppHD-0000000170w-2h57@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix autovacuum's database sorting.
  In-Reply-To: <E1wppHD-0000000170w-2h57@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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