model-writtenrun 1523 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Ashutosh Bapat opened the thread with a two-line fix preserving partitioned joinrels' existing paths, explaining that apply_scanjoin_target_to_paths discarded non-partitionwise alternatives that it could not reconstruct #1; he linked the issue to an actual customer slowdown #2.
- Ashutosh added regression coverage while retaining the original query as an example where partitionwise joining costs more #3; Jakub Wartak verified the improvement, reported customer timings exceeding 530 seconds versus about 23 seconds, and identified another regression-test failure on master #4.
- Ashutosh adapted the patch to master, expanded its explanation, changed the fractional-path expected output, and removed a redundant SET statement #6; Arne Roland questioned the resulting test coverage and warned against backpatching potentially disruptive planner changes #7, which Ashutosh accepted #9.
- Richard Guo raised the risk of redundant Append paths and cross-platform plan variation #12, while Andrei Lepikhov asked about foreign-join pushdown #14; Ashutosh confirmed that the same planning decision affects pushdown #15.
- Robert Haas and Tom Lane requested a public example demonstrating the performance problem #16 #17, and Ashutosh returned the patch with feedback in January 2025 because he could not reproduce the customer case publicly #19.
- Robert revived the work in October 2025 after independently encountering the pathlist problem, acknowledged that Ashutosh's original explanation was correct, and proposed fixing master without backpatching #20.
- Robert investigated newly affected regression cases #21, and Richard suggested selectively discarding partitionwise paths #22; Robert cautioned that manipulating pathlists could violate planner invariants and considered rebuilding retained paths instead #24.
- Robert produced a public performance example showing that row-count-inflating joins make a subsequent Merge Append expensive #26, and Arne reproduced the sorted-query slowdown and agreed that it demonstrated a need for change #27.
- Robert traced one apparent cost regression to fuzzy path-cost comparisons #28 and another preference for non-partitionwise plans to merge-join early-stop estimates #32; Richard identified a related clause-order estimation discrepancy but explicitly left that separate issue outside this fix #34.
- Richard proposed accepting one partially partitionwise plan, disabling merge joins for another test, and removing a redundant filter from a third #35; Robert incorporated those recommendations and preserved fractional partitionwise coverage in a revised patch, leaving one troublesome test unresolved #36.
- Robert resolved that last test by recognizing its row-count inflation and adding equality conditions that restored the intended partitionwise plan, then posted the completed patch with rewritten comments #37.
- Richard approved the revised tests but renewed his concern about duplicate Append alternatives #38; Robert and Richard agreed to proceed with the small fix and defer broader target-list planning changes until a demonstrated problem justified them #39 #40.
- Robert committed #37 as 014f9a831a, preserving its complete code and test diff while expanding the commit explanation, and reported that the buildfarm initially looked healthy #42.
- After the main commit, Ashutosh reproduced Robert's performance results, verified the retained test coverage under a debugger, and resubmitted the redundant SET removal omitted from his earlier patch #43.
- Ashutosh explained why the repeated SET had caused confusion #45, and Robert accepted the cleanup as 3f33b63de2 with a shortened commit message #46; the thread ended with both changes landed and Ashutosh's acknowledgment #47.