model-writtenrun 2279 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
May - Aug 2018 · 3 entries
- Alexander Kuzmenkov proposed eliminating redundant unique self-joins generated by ORMs in #1, initially attempting the transformation during path generation.
- The early discussion weighed useful view and ORM cases against planning overhead, while David Rowley proposed earlier elimination, candidate grouping and systematic reference replacement in #9; Kuzmenkov adopted that structure in #27.
- Kuzmenkov expanded removal to relations referenced in target lists in #28, and Thomas Munro's isolation-test failure in #29 led to row-mark compatibility checks in #30.
Oct - Dec 2018 · 1 entry
- Reviews and fixes through #31, #34 and #35 addressed clause transfer, equivalence classes, placeholders and lateral references, revealing how many planner structures needed consistent replacement.
Feb - Mar 2019 · 3 entries
- Tom Lane independently repaired the mark-and-restore regression test so self-join elimination would not erase its purpose in 24d08f3c0a, then rebased and reviewed the feature in #36.
- Kuzmenkov answered Lane's cache and list-handling concerns with printable UniqueRelInfo and a HAVING-reference fix in #37, but Rowley continued questioning the independently selected unique-index proof.
- After #41 tried broader index matching, Rowley supplied a different proof based on matching self-join quals in #43, explicitly branching from #39; Kuzmenkov explored it in #45 before returning to the older detector in #46.
May - Aug 2019 · 1 entry
- Andrei Lepikhov took over in #47, fixing lateral references in special range-table entries, while Konstantin Knizhnik subsequently contributed OR-clause and bookkeeping fixes in #50 and #51.
Jan 2020 · 1 entry
- Lepikhov added an enabled-by-default configuration switch and revised clause redistribution in #54, then added join-order compatibility checks in #56.
Sep 2020 - Jan 2021 · 2 entries
- Renewed review persuaded Lepikhov to adopt Rowley's qual-splitting detector in the major rewrite #58, but Heikki Linnakangas exposed wrong results in its additional elimination cases in #62, causing that extension to be withdrawn in #63.
- After a rebase in #65, Hywel Carver reported successful testing and questioned newly introduced NULL filters in #66; Lepikhov then substantially reduced duplicated removal code in #67.
May - Jul 2021 · 1 entry
- An optional equivalence-class optimization accompanied #68, but discussion of complexity and redundant-predicate semantics kept it outside the main rebased submission #77.
Feb - Jul 2022 · 2 entries
- Greg Stark examined equivalence-class inference and adverse planning overhead in #81, while Jaime Casanova supplied benchmark results in #82; later reviews by Ronan Dunklau and Zhihong Yu refined correctness and implementation details.
- The patch added explicit handling of uniqueness derived from base restrictions in #89, and Zhihong Yu's discovery of an ineffective limit led to a separate self_join_search_limit setting in #100.
May - Jul 2023 · 2 entries
- Following another long development interval, newer outer-join planner structures required substantial adaptation in #106 and a deeper redesign separating common removal stages in #107.
- Lepikhov repaired omissions from that redesign in #108, including JoinDomain replacement and cases without explicit self-join quals, before resuming final review with #109.
Sep - Oct 2023 · 3 entries
- An experiment to avoid unnecessary NULL checks in #114 attracted Alena Rybakina's review and fix-up #115, but Alexander Korotkov rejected that extra complexity while adopting selected safeguards and Rowley's candidate-sorting idea in #117.
- Lepikhov supplied iterative retry after successful eliminations in #122, which Korotkov integrated in #123; overhead experiments then led him to remove self_join_search_limit while retaining the on/off switch in #125.
- Final cleanup produced #129, committed unchanged as d3d55ce571, with partitioned- and foreign-table extensions left for later.
Dec 2023 - Feb 2024 · 6 entries
- Alexander Lakhin's UPDATE failure report in #130 prompted Lepikhov's missing-result-reference fix #131, which Lakhin tested in #132 and which landed with added regression coverage as a7928a57b9.
- Lakhin next exposed invalid uniqueness-cache reuse in #133, leading directly to the unattached self-join cache-discrimination fix 30b4955a46.
- A further incorrect UPDATE RETURNING result in #136 showed that fixing references alone was insufficient, and Korotkov's snapshot and EPQ analysis in #137 led to excluding target relations in 8c441c0827.
- A lateral-subquery failure led to Korotkov's target-list fix #141, which Lepikhov broadened to parse-tree traversal in #143 and which landed unchanged as 489072ab7a.
- Richard Guo demonstrated that this traversal mishandled nesting and varlevelsup in #144, supplying the recursive correction that landed with light editorial changes as 466979ef03.
- Noah Misch criticized mixing extensive test rewrites with that bugfix in #148, and Korotkov acknowledged the reviewability and commit-explanation problems in #149.
Apr - Jul 2024 · 7 entries
- Further lateral failures prompted a cross-reference prohibition in #153, then TABLESAMPLE exclusion in #155; Guo showed placeholders could also create self-dependencies in #158, leading to the four-part cleanup #159.
- Tom Lane argued in #160 that continuing basic failures made the feature unsuitable for the approaching release, Robert Haas supported a systematic correctness review in #163, and Korotkov accepted reverting despite Lepikhov's preference for disabling it by default.
- The feature and accumulated fixes were withdrawn by d1d286d83c, without an attached revert patch; subsequent discussion required further investigation rather than automatic relanding.
- Lane questioned the bespoke tree-manipulation machinery in #167, while Korotkov explained in #171 why EPQ's current tuples and joined relations' snapshot tuples complicate target-relation elimination.
- Lepikhov restored the accumulated implementation in #174, and jian he replaced its custom walker with ChangeVarNodes and explored DML and conditional RETURNING support in #176 and #177.
- Concurrency failures discussed in #178 limited that expansion, and the consolidated patch #188 retained elimination inside DML queries while excluding their result and merge-target relations.
- Vardan Pogosyan reported assertion-enabled randomized testing in #192 and #195, while Dean Rasheed's reviews in #196 and #199 prompted helper, API and naming improvements.
Oct 2024 - Apr 2025 · 9 entries
- Korotkov explored automatic PlannerInfo traversal but rejected its complexity and efficiency tradeoffs in #203, favoring explicit maintenance guidance that Lepikhov incorporated when resuming from an older branch in #205.
- A private Lakhin report exposed negative bitmapset replacement in shared left/self-join code, fixed in #206 and given a simpler regression in #207; Korotkov then consolidated replacement helpers in #208.
- Rybakina extracted repeated clause-deduplication logic in #211, Korotkov integrated it with corrected list-pointer handling in #212, and the polished #213 landed unchanged as fc069a3a63.
- Lane's Coverity report #215 led to explicit branching instead of the signed ojrelid sentinel, and the reviewed patch #220 landed unchanged as e167191dc1.
- Ranier Vilela proposed avoiding unnecessary optional uniqueness work in #223, but the supplied record does not establish a landing for that separate optimization.
- Another private Lakhin failure led to Rybakina and Lepikhov's placeholder-preservation fix, posted by Korotkov in #224; discussion favored retaining possibly redundant placeholders over complex removal analysis.
- Tender Wang's sample-configuration addition #229 first landed unchanged as c2d329260c, after which Daniel Gustafsson identified its conflict with GUC_NOT_IN_SAMPLE in #230.
- Lane supported treating the documented setting like other enable flags in #234, and 717d0e8dd9 combined Wang's sample entry with removal of the contradictory flag.
- Korotkov finalized the placeholder correction's rationale in #238 and resent it with the corrected version label in #239, stating his intention to push it; no supplied candidate establishes that fix's landing.
Jun - Jul 2025 · 2 entries
- Michael Paquier reported that early elimination removed aliases before pg_hint_plan's join_search_hook in #240, prompting consideration of a new pre-elimination hook in #244.
- By #246, Paquier accepted disabling self-join elimination where necessary, and Korotkov closed the item as a non-bug in #247, leaving the main feature landed, target-relation support deferred and no new hook planned unless other affected extensions emerge.