model-writtenrun 66 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Viktor Leis reported that a chain of LEFT JOINs returned an incorrect non-NULL value on PostgreSQL 16 and later in #1; Tender Wang traced this to constant propagation replacing strict cloned join clauses with TRUE after outer-join reordering in #2.
- Nitin Motiani proposed selectively preserving cloned clauses using incompatible_relids and deferred outer-join relids in #3, while Richard Guo advocated preserving all clones in #4; Nitin's #6 supplied both a rebased selective version and the simpler alternative.
- Tender Wang tested the alternatives, demonstrated unnecessary retained clauses, and supplied a placement-dependent rework in #8 that recorded relevant outer joins in RestrictInfo and filtered clauses when constructing individual join paths.
- Richard Guo rejected the new RestrictInfo field for backpatching because it broke ABI in #9, then questioned the selective check's interpretation of incompatible_relids in #10; he favored accepting redundant clauses and left placement-dependent elimination as a possible future improvement.
- Nitin Motiani adopted the simpler approach in #11, preserving all cloned clauses, setting their cached selectivities to 1.0, and adding a second regression case with a different outer-join arrangement.
- Richard Guo found that parameterized scans could bypass those cached selectivities and double-count the retained clause, so #12 restored the norm_selec redundancy marker and reorganized the tests around existing tables.
- Richard Guo committed #12 unchanged as f400289946 and confirmed backpatching through PostgreSQL 16 in #13, completing the bug fix while leaving the more elaborate redundancy optimization out.