pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org, Richard Guo <guofenglinux@gmail.com>
Subject: Re: BUG #18953: Planner fails to build plan for complex query with LATERAL references
Date: Thu, 26 Jun 2025 14:37:57 -0400
Message-ID: <1487176.1750963077@sss.pgh.pa.us> (raw )
In-Reply-To: <afb7be67-cc8a-42b9-952a-0bd7e8c9f925@gmail.com >
References: <18953-1c9883a9d4afeb30@postgresql.org >
<CAMbWs49XTfPD9OCw9xWsRtbiNYgQ-Nau_hHy9UbbGP-w2V=ANQ@mail.gmail.com >
<1268645.1749765012@sss.pgh.pa.us >
<1499514.1749848324@sss.pgh.pa.us >
<CAMbWs4_E7wC3LX17jr+RnRunz9ROcwhn0eXt0riJ6FjbxB0g+g@mail.gmail.com >
<527134.1750087495@sss.pgh.pa.us >
<CAMbWs4_wYvQWHCwBfSXj9OQ-fWn+xnntR+EVzks2KB0eRWcRpw@mail.gmail.com >
<835659.1750177751@sss.pgh.pa.us >
<837b0dce-b2f3-4811-bccf-f42e8985d6e2@gmail.com >
<3040798.1750617116@sss.pgh.pa.us >
<3886446.1750703041@sss.pgh.pa.us >
<afb7be67-cc8a-42b9-952a-0bd7e8c9f925@gmail.com >
Alexander Lakhin <exclusion@gmail.com> writes:
> I've managed to discover one more anomaly introduced by a16ef313f, that is
> not fixed by fix-bug-18953-some-more:
Just to note that I am studying this. It looks to me like the
issue is that identify_current_nestloop_params() is handing back
a PHV with too few nullingrel bits set for the place that we want
to put it, as is acknowledged to be possible in its comments.
We thought we could get away with that, but in this context setrefs.c
will complain. I'm inclined to try to make it set the bits more
accurately, rather than further weaken setrefs.c's cross-checks.
I'm wondering again whether this isn't a case that is reachable
before a16ef313f. Perhaps the have_dangerous_phv check prevented
forming plan trees that could have this issue, but it's not real
clear why.
regards, tom lane
view thread (21+ messages) latest in thread
Message-ID: <1487176.1750963077@sss.pgh.pa.us>
Permalink: ../1487176.1750963077@sss.pgh.pa.us/
Also on: postgresql.org/message-id/1487176.1750963077@sss.pgh.pa.us
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, exclusion@gmail.com, guofenglinux@gmail.com
Subject: Re: BUG #18953: Planner fails to build plan for complex query with LATERAL references
In-Reply-To: <1487176.1750963077@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox