On Mon, Jul 13, 2026 at 7:23 PM Arne Roland <[email protected]> wrote: > My idea would be to put a bitmapset into remove_rel_from_query with the > seen ones and recurse removing it from the rinfo. I attached a sketch of > my idea. But maybe our have a better one.
Thanks for the report and the patch. I think the fix is on the right track. (BTW, the seen_serials bitmap is to avoid processing any join clause more than once, the same trick used in rebuild_joinclause_attr_needed.) I've made some cosmetic tweaks to the patch, added a commit message, and included a test case, as attached. I plan to push this soon, barring any objections. - Richard
v2-0001-Strip-removed-relation-references-from-PHVs-in-jo.patch
Description: Binary data
