model-writtenrun 4266 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tor Erik Linnerud reported that a three-table join returned no rows with index scans enabled but the expected row with them disabled, and supplied a reproducer in #1; Andres Freund reproduced the failure on older releases in #2.
- Peter Geoghegan initially investigated B-tree scan-key preprocessing in #3, but Andres Freund traced the failure to a uniqueness proof taken from a partial index while the plan scanned a different index containing excluded rows in #4, explaining why the B-tree behavior itself was legitimate in #5.
- Andres Freund proposed excluding partial indexes from relation_has_unique_index_for() and reported that this fixed the failure in #7; his explanation in #9 and #11 showed that inner_unique stopped the lower join before higher-level conditions could reject the misleading first match.
- David Rowley identified join-derived predicate proofs as the problem in #12 and proposed a separate flag based only on base restrictions in #13; Tom Lane endorsed the simpler exclusion in #14.
- David Rowley raised concerns about losing valid join removals and unique-join optimizations in #15, while Tom Lane questioned the compatibility and complexity of the alternative in #16; David then submitted the conservative exclusion with regression coverage in #17.
- David Rowley committed #17 as 7fcd7ef2a9, with comment formatting and commit-message edits but unchanged logic and tests, and backpatched the fix through PostgreSQL 11.
- After confirming the conservative fix had landed, David Rowley posted a follow-up delta in #18 that restores safe partial-index proofs using predOKBase; this enhancement remained proposed at the thread's end, with representation of the new state for backpatching still unresolved.