model-writtenrun 8694 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Pierre Ducroquet proposed functional-dependency support for IN and array containment to improve estimates in multi-tenant databases, attaching two dependencies.c patches in #1.
- Tomas Vondra initially questioned the statistical assumptions and requested tests in #2; after Pierre’s examples in #3, Tomas accepted IN support but demonstrated that dependencies between whole arrays cannot safely estimate containment of their elements in #4.
- Tomas supplied an expanded series in #5, retaining Pierre’s IN implementation, simplifying argument handling, rejecting ALL for functional dependencies, adding tests, and introducing separate MCV support for ScalarArrayOpExpr.
- Dean Rasheed proposed broader clause support and highlighted compatibility problems in #6 and #8, but Tomas maintained that whole-value dependency degrees do not justify element-level inference; they settled on IN/ANY support for PG13 and deferred broader operators in #10.
- Tomas committed the first four patches from #5 with a documentation addition as 8f321bd16c, and its unchanged MCV patch as e83daa7e33, announcing both landings and the containment deferral in #11.
- To address the newly enlarged estimation difference between equivalent IN and OR expressions, Tomas posted a separate patch recognizing same-attribute OR clauses in #12.
- Dean reviewed that OR patch in #13, arguing that equalizing the underlying single-column estimates was outside scope, and attached a separate correction from thread #41787 to prevent combined dependency estimates from exceeding either column’s estimate.
- Tomas reviewed Dean’s correction in #17, requesting that the enlarged function be split and that comments explain how the new minimum-based formula repairs the old formula.
- Tomas committed the OR-recognition patch from #12 unchanged as ccaa3569f5, confirming in #18 that the underlying OR estimation formula remained unchanged.
- Dean revised the selectivity correction in #19, separating dependency selection from application and expanding the mathematical explanation; Tomas reviewed it in #20 and suggested the helper name clauselist_apply_dependencies.
- Dean committed #19 with the suggested helper name and light editorial changes as 87779aa474, confirming the landing in #21.
- Tomas confirmed in #23 that the intended PG13 IN/ANY work was complete while containment still required discussion; Daniel Gustafsson closed the entry as committed in #24, leaving containment for a new commitfest entry.