Re: UNION removes almost all rows (not duplicates) - in fresh build of pg17!

hubert depesz lubaczewski <depesz@depesz.com>

From: hubert depesz lubaczewski <depesz@depesz.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: pgsql-bugs mailing list <pgsql-bugs@postgresql.org>
Date: 2024-05-21T10:38:51Z
Lists: pgsql-bugs

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix generate_union_paths for non-sortable types.

  2. Doc: remove 66c0185a3 from release notes.

  3. Revert commit 66c0185a3 and follow-on patches.

  4. doc PG 17 relnotes: adjust vacuum items

  5. Allow planner to use Merge Append to efficiently implement UNION

On Tue, May 21, 2024 at 09:54:25AM +1200, David Rowley wrote:
> Thanks for the report.
> It looks like it's a very simple fix.  The problem is I wasn't setting
> groupList when the grouping_is_sortable() returned false.  In the
> prior version, make_union_unique() always set that.
> The attached should apply cleanly up to d2a04470a.

Hi,
tested, and can confirm that applying this patch on top of
d2a04470aa6401c1938cc107e0b2c56c22a2321f solved the problem.

Best regards,

depesz