agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Fix autovacuum's database sorting.
4+ messages / 1 participants
[nested] [flat]

* pgsql: Fix autovacuum's database sorting.
@ 2026-07-31 15:35 Nathan Bossart <nathan@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Nathan Bossart @ 2026-07-31 15:35 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/baab3268cc275277ee923c0d2fcaf62a61707eea

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



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

* pgsql: Fix autovacuum's database sorting.
@ 2026-07-31 15:35 Nathan Bossart <nathan@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Nathan Bossart @ 2026-07-31 15:35 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b3331578b58650be6811e842d79937c4a51b74ef

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



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

* pgsql: Fix autovacuum's database sorting.
@ 2026-07-31 15:35 Nathan Bossart <nathan@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Nathan Bossart @ 2026-07-31 15:35 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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



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

* pgsql: Fix autovacuum's database sorting.
@ 2026-07-31 15:35 Nathan Bossart <nathan@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Nathan Bossart @ 2026-07-31 15:35 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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



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


end of thread, other threads:[~2026-07-31 15:35 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-31 15:35 pgsql: Fix autovacuum's database sorting. Nathan Bossart <nathan@postgresql.org>
2026-07-31 15:35 pgsql: Fix autovacuum's database sorting. Nathan Bossart <nathan@postgresql.org>
2026-07-31 15:35 pgsql: Fix autovacuum's database sorting. Nathan Bossart <nathan@postgresql.org>
2026-07-31 15:35 pgsql: Fix autovacuum's database sorting. 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