Re: BUG #18465: Wrong results from SELECT DISTINCT MIN in scalar subquery using HashAggregate - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18465: Wrong results from SELECT DISTINCT MIN in scalar subquery using HashAggregate
Date
Msg-id 2787680.1716051404@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #18465: Wrong results from SELECT DISTINCT MIN in scalar subquery using HashAggregate  (Dmitry Dolgov <9erthalion6@gmail.com>)
List pgsql-bugs
Dmitry Dolgov <9erthalion6@gmail.com> writes:
> Thanks, I could reproduce this in v15 and v16. Interestingly enough it
> was fixed in d0d44049d1, but looks like due to lack of error reports the
> fix was applied only on the main branch. I assume this one makes it
> necessary to back-patch the fix.

Hah.  Nothing like fixing a bug that you know is there but you can't
demonstrate it ;-).  I confirm the problem appears in d0d44049d1^
(and at least as far back as v12), but not in d0d44049d1 or HEAD.
So yeah, add test case and back-patch.

Many thanks for the test case!

            regards, tom lane



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18472: SELECT FOR UPDATE locking more rows than expected
Next
From: Noah Misch
Date:
Subject: Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae