On Fri, Jul 24, 2026 at 06:12:03PM +0300, Хамидуллин Рустам wrote:
> static int
> db_comparator(const void *a, const void *b)
> {
> - if (((const avl_dbase *) a)->adl_score == ((const avl_dbase *)
> b)->adl_score)
> - return 0;
> - else
> - return (((const avl_dbase *) a)->adl_score < ((const avl_dbase *)
> b)->adl_score) ? 1 : -1;
> + return pg_cmp_s32(((const avl_dbase *) a)->adl_score,
> + ((const avl_dbase *) b)->adl_score);
> }
>
> It breaks the database vacuuming order. The order should clearly be different
> here.
> This bug was introduced in PostgreSQL 17. I have attached а fix.
Oops, I think you're right. Thanks for reporting. I'll plan on committing
this sometime next week.
--
nathan