Re: BUG #18627: Regression (15 -> 16) - Join removal not performed when join condition spans multiple tables

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: gourlaouen(dot)mikael(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: BUG #18627: Regression (15 -> 16) - Join removal not performed when join condition spans multiple tables
Date: 2024-09-22 13:45:30
Message-ID: CAApHDvpUiPCefrOL2id3LbF6MC0oiz8pJcDcUw3qZ=aVHjViHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 23 Sept 2024 at 00:55, PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> Postgres 15 is able to nicely remove all the joins and gives a nice tidy
> query plan:
> ```
> Seq Scan on origin o (cost=0.00..16.50 rows=650 width=32)
> ```
>
> Postgres 16 (and 17rc1) on the other hand are giving me this query plan
> instead:
> ```
> Hash Left Join (cost=24.62..42.84 rows=650 width=32)

Thanks for the report.

It looks like the first bad commit is acc5821e4d (Further fixes in
qual nullingrel adjustment for outer join commutation)

I doubt breaking this was an intended change of the nullable Var work.
Tom can likely confirm.

David

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2024-09-22 14:00:00 BUG #18628: Race condition during attach/detach partition breaks constraints of partition having foreign key
Previous Message Craig Milhiser 2024-09-22 11:58:41 Reference to - BUG #18349: ERROR: invalid DSA memory alloc request size 1811939328, CONTEXT: parallel worker