Re: BUG #18953: Planner fails to build plan for complex query with LATERAL references
Tom Lane <tgl@sss.pgh.pa.us>
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>
Date: 2025-06-26T18:37:57Z
Lists: pgsql-bugs
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
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix some new issues with planning of PlaceHolderVars.
- 66e9df9f6ef5 18.0 landed
-
Remove planner's have_dangerous_phv() join-order restriction.
- a16ef313f2c2 18.0 landed