model-writtenrun 2241 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andrei Lepikhov reported that reducing LIMIT from 10 to 2 could produce a much more expensive MergeAppend plan and supplied #1, correcting absolute tuple counts into fractions by dividing by child relation rows and adding a regression test.
- Junwang Zhao reported passing tests but raised a possible division-by-zero concern in #2; Andrei explained that dummy relations should already be excluded and added an assertion in #3, which Junwang approved in #4.
- Alexander Korotkov supplied #5 with a clearer assertion comment and commit message, retained Andrei's authorship, and proposed backpatching the fix through PostgreSQL 15.
- Alvaro Herrera objected to backpatching potentially disruptive planner changes in #6, and Tom Lane agreed in #7, emphasizing the high bar for changing stable-branch plans without a wrong-answer bug.
- Alexander accepted development-only scope in the thread's final message #8, then committed 3d3a81fc24 with the exact code and tests from #5, updating the commit message to explain the decision against backpatching.