Re: Negative value of numGroups
Andrei Lepikhov <a.lepikhov@postgrespro.ru>
From: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
To: pgsql-bugs@lists.postgresql.org
Date: 2022-05-17T12:59:23Z
Lists: pgsql-bugs
Attachments
- 0001-Safe-calculation-of-the-minimum-number-of-groups-fro.patch (text/plain) patch 0001
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
Commits
-
Avoid overflow hazard when clamping group counts to "long int".
- a916cb9d5a89 15.0 landed