model-writtenrun 2296 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Robins Tharakan reported a reproducible corrupt MVNDistinct error involving repeated outer-join clauses in #1; Tomas Vondra traced it to duplicate Vars in the estimator's GroupVarInfo list and suggested reusing the grouping-estimation preparation machinery in #2.
- Andrei Lepikhov proposed generalizing add_unique_group_var() for hash-join bucket estimation in #3, but Alexander Korotkov demonstrated that another join key triggered an assertion because deduplication broke correspondence with origin_rinfos in #4.
- David Rowley supplied an independent documentation patch in #5 explaining the uniqueness requirement, minimum two-column match, and deterministic statistics selection, while leaving broader implementation cleanup out of that patch.
- Andrei revised the fix in #6 to store each source RestrictInfo inside GroupVarInfo and added Alexander's failing case, retaining the shared-helper approach.
- Andrei endorsed David's comment changes and proposed exporting GroupVarInfo in #7; Tomas argued that its short-lived local design was unsuitable and that broader rework was outside PostgreSQL 18's bug-fix scope in #8, which Andrei accepted in #10.
- Andrei abandoned the invasive shared-helper approach in #11, implementing nullingrels removal and exact-duplicate filtering directly in estimate_multivariate_bucketsize() to avoid inappropriate known-equal-key elimination.
- David committed the documentation patch from #5 with one punctuation adjustment as f3281f9f93; Tomas's agreement in #12 came after that commit, and David confirmed the landing in #13.
- Alexander approved Andrei's local fix and posted a polished version in #14, explaining why preserving clause correspondence and retaining known-equal Vars made add_unique_group_var() unsuitable.
- At the thread's last message, Andrei approved the polished fix and requested an explanation of unused statistics fields in #15; Alexander subsequently committed #14 as 9f404d7922 with that explanation and equivalent zero-initialization cleanup, leaving both concrete patches landed and broader abstraction work deferred.