model-writtenrun 1815 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Bryan Fox reported that PostgreSQL 17 stopped using a partial index whose IS NOT NULL predicate was redundant with a column constraint, although PostgreSQL 16 used it #1.
- Tom Lane diagnosed inconsistent simplification of query and index predicates and suggested moving index simplification into planner information collection #2; David Rowley explained that relcache expressions lack both a valid planner root and corrected relation numbers, then supplied a prototype second simplification pass #3.
- Richard Guo identified the same concern for index expressions and considered moving simplification out of the relcache #4; his expanded patch retained David's second-pass approach, handled multiple reducible predicate terms, and fixed relation-number ordering and planner-root handling for constraints and statistics #6.
- Richard split the work into two patches, added regression coverage and ON CONFLICT index-inference handling, and questioned the cost of simplifying index expressions twice; caching untransformed expressions also seemed unattractive because every fetch would require simplification #7.
- The constraint/statistics portion of #7 landed unchanged as 317c117d6d, and Richard posted the remaining index patch with minor comment cleanup, arguing that small expression trees made the extra pass acceptable #8.
- Richard added index-expression tests and documented the performance rationale, while explaining that the implementation depended on development-branch changes unavailable in PostgreSQL 17 and 18 #9.
- The final index patch from #9 landed with only rebase differences as c925ad30b0; Richard confirmed that both fixes were on master, but a solution for PostgreSQL 17 and 18 remained unresolved #10.