Re: BUG #19560: Wrong results since v16: removable LEFT JOIN silently drops WHERE qual

From: Nitin Motiani <nitinmotiani(at)google(dot)com>
To: orestis(at)orestis(dot)gr, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19560: Wrong results since v16: removable LEFT JOIN silently drops WHERE qual
Date: 2026-07-24 16:50:12
Message-ID: CAH5HC97SU+JHHT4rJo76ZO09KVmZZh=bF_ZA67YLq4q-Vv3Weg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

Thanks for this detail. I'm not very familiar with this code but this
analysis helped me find the functions and understand it a little
better. I have started working on a WIP patch which I'm attaching
here. I think changing the PHV to the const if phnullingrels size goes
to zero might fix this.

I'm not sure of this approach because a comment warns against removing
PHV if phnullingrels are removed. But I have only done this in the
cases when `is_pseudo_constant_clause` returns true. I'll spend some
more time on this to understand the complete flow. For now, I'm
sending the WIP patch to get feedback.

Attachment Content-Type Size
WIP-v1-0001-WIP-Convert-PHVs-to-constants-if-phnullringrels-w.patch application/x-patch 4.6 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Previous Message Rafia Sabih 2026-07-24 12:06:59 Re: BUG #19557: Parallel leader stuckat ParallelFinish leaked InterruptHoldoffCount