Re: Wrong results from join removal with DISTINCT ON + SRF subquery

From: Kirill Reshke <reshkekirill(at)gmail(dot)com>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Wrong results from join removal with DISTINCT ON + SRF subquery
Date: 2026-09-19 04:52:44
Message-ID: CALdSSPhiV4LWBZ27brBa17ZZ8f3UaVZ8sWQXy9eQfsL_cmVUug@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 25 Aug 2026 at 11:24, Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
>
> On Mon, Aug 24, 2026 at 10:53 AM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> > Thanks for looking at this! I'll push the patch and back-patch to all
> > supported branches if there are no objections.
>
> Done.
>
> - Richard
>
>

HI
Looks like there is related bug report here
[0] https://www.postgresql.org/message-id/flat/19696-135220dd92659a4e%40postgresql.org

wrong join removal is fixed, but cost estimations are still wrong

--
Best regards,
Kirill Reshke

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2026-09-19 05:00:26 Re: [PG19][PATCH] Make postgres_fdw statistics import atomic
Previous Message shihao zhong 2026-09-19 03:07:07 Re: [Patch] New pg_stat_tablespace view