Re: Negative value of numGroups

From: Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Negative value of numGroups
Date: 2022-05-17 12:59:23
Message-ID: ed1d1a2d-6061-24e5-e8eb-dbda3ec8f66c@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 13/5/2022 11:56, Andrey Lepikhov wrote:
> (long) Min(numGroups, (double) LONG_MAX);
>
> can return negative value, if numGroups > LONG_MAX.
So, because this problem still breaks sqlancer tests I prepared a patch
(with regression test) that fixes it.

--
regards,
Andrey Lepikhov
Postgres Professional

Attachment Content-Type Size
0001-Safe-calculation-of-the-minimum-number-of-groups-fro.patch text/plain 6.1 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2022-05-17 15:34:17 Re: Negative value of numGroups
Previous Message Michael Paquier 2022-05-16 23:52:57 Re: BUG #17481: sometime pg_stat_statements coredump