model-writtenrun 1232 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- James Coleman opened the thread by separating a startup-cost problem discovered during incremental-sort work and submitting Tomas Vondra's patch; he also identified that add_partial_path_precheck would need corresponding changes #1.
- Robert Haas acknowledged that the original rationale had overlooked LIMIT, and Tomas Vondra favored handling the correction independently of the already-large incremental-sort series #2 #3.
- James Coleman explored a standalone reproducer involving parallel partial paths beneath LIMIT but could not obtain the desired plan difference; Robert Haas explained that zero parallel setup and tuple costs distorted the experiments, and James ultimately questioned whether a separate reproducer was necessary given the incremental-sort example #4 #5 #6 #7.
- Tomas Vondra posted an expanded series covering both partial-path insertion and prechecking, plus an optimization to defer pathkey comparisons until costs made them necessary #8.
- Nearly six years later, Robert Haas revived the work after pg_plan_advice testing exposed an existing regression query whose cheaper startup-sensitive plan was discarded; he rebased and substantially rewrote the series, discovering disabled_nodes bugs in both path-list ordering and prechecking #9.
- Robert Haas separated the ordering repair but combined the precheck's disabled_nodes and startup-cost corrections to avoid rewriting the same function twice; he also adjusted a hash-join test to preserve its intended coverage and argued against backpatching changes that could destabilize released query plans #9.
- Richard Guo endorsed the changes and spotted an outdated ordering comment, which Robert Haas corrected when committing the first patch as 6e466e1e83; Robert then resent the unchanged startup-cost remainder #10 #11.
- Richard Guo reviewed the remainder and suggested sharing the fuzzy-cost comparison logic through a helper, but Robert Haas noted that this would require ten parameters and retained the duplicated logic #12 #13.
- Robert Haas corrected overly permissive retention of paths with equal pathkeys, restored a tight fuzzy-cost tie-breaker, and cleaned up formatting; the revised patch also changed an expected hash-join orientation to favor lower startup cost #13.
- Robert Haas measured only a 0.3% increase in retained partial paths across the core regression suite, explained the improved aggregation and hash-join plans, and justified making the hash-join test inputs asymmetric for stability #14.
- The final startup-cost patch landed unchanged as 8300d3ad4a, crediting Robert Haas and Tomas Vondra as co-authors, and Robert's final message confirmed completion with both fixes landed #13 #15.