| From: | Vik Fearing <vik(at)postgresfriends(dot)org> |
|---|---|
| To: | 2320415112(at)qq(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #19563: Planner does not eliminate redundant outer DISTINCT over UNION |
| Date: | 2026-07-21 14:28:20 |
| Message-ID: | 74d59eb1-8100-4899-9f70-6e29f22e4c5b@postgresfriends.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On 21/07/2026 12:46, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 19563
> Logged by: cl hl
> Email address: 2320415112(at)qq(dot)com
> PostgreSQL version: 17.10
> Operating system: Linux LAPTOP-2SQAVLB0 6.6.87.2-microsoft-standard-
> Description:
>
> PostgreSQL keeps an extra duplicate-removal operator for a redundant outer
> `DISTINCT` over a `UNION` query.
Funny this should come up, I have recently been working on improvements
for DISTINCT tracking. Nothing ready to publish yet, but at least one
other person noticed this missed optimization, and others like it.
--
Vik Fearing
| From | Date | Subject | |
|---|---|---|---|
| Next Message | PG Bug reporting form | 2026-07-21 14:30:47 | BUG #19564: Semantically redundant DISTINCT in an IN subquery changes the join strategy and improves execution t |
| Previous Message | Zsolt Parragi | 2026-07-21 10:55:11 | Race between datachecksum enablement and create table with the file_copy strategy |