On Tue, Oct 13, 2026 at 7:05 PM Richard Guo <[email protected]> wrote:
> The simplest fix I can think of is to also count the outer joins that
> the outer rels in scope have already computed as req_outer in
> create_nestloop_plan(), though this is another band-aid here.  See
> 0001.

Pushed and back-patched to v18.  v16 and v17 have the same bug, but
the fix there would have to be a new join-order restriction in
have_dangerous_phv(), since they can't compute the PHV in the
nestloop's outer side.  A simple version of that changed plans that
work fine today, and I don't think a failure this rare is worth that
risk in the stable branches.  So I left them alone.  If someone hits
it there, we can revisit.

> The attached 0002 does that.  It's not a bug fix, so it's for master
> only.

Pushed to master.

- Richard


Reply via email to