model-writtenrun 4245 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jaime Casanova reported an index-dependent crash in PostgreSQL beta2, and Michael Paquier reproduced it and opened a tracking item #1 #2.
- Richard Guo reduced the query and suggested removing the conflicting outer-join relid from required_outer; Tom Lane explained that the input path itself was invalid because it required a value available only after the outer join being constructed #3 #4.
- Tom Lane traced the failure to a lateral reference allowing an invalid path through the param_source_rels heuristic and proposed tracking incompatible parameterization relids, while deferring prevention of the underlying bogus index path #5.
- Richard Guo found that PostgreSQL 15 also generated the problematic path without the new assertion failure, then submitted a draft tracking incompatible outer-join relids and both sides of those joins across all three join methods #6 #7.
- Tom Lane simplified the draft to reject input paths parameterized by the outer join currently being formed, removing the extra structure field and initially limiting the check to nested-loop joins because he believed existing assertions protected merge and hash joins #8.
- Richard Guo accepted the simpler approach but demonstrated that commuting outer joins could still trigger the failure through a hash join, argued that merge joins also needed protection, and identified the redundant sjinfo null check #9 #10.
- Tom Lane committed the revised patch with checks for all three join methods, the redundant null check removed, and a revised regression test; he reported that partial join paths already rejected the problematic cases a798660ebe #12.
- A separate concern about checking top_parent_relids in non-nested-loop assertions remained under discussion, while Richard Guo confirmed that partial join paths were safe and moved minor cleanup work to another thread #11 #13 #14 #15.
- The crash fix was landed, but the parent-relid discussion remained open: Tom Lane reasoned that incoming paths always used top-parent parameterization and suggested simplifying nested-loop handling, while Richard Guo agreed with the premise and requested details of the proposed simplification #16 #17.