model-writtenrun 9637 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- David Rowley proposed eliminating singleton Append and MergeAppend nodes to reduce executor overhead and unnecessary Materialize nodes, considering either promotion of the surviving child relation or a proxy-path mechanism in #1; after Robert Haas questioned the parallelism claim in #3, David corrected that part of his motivation in #5.
- Antonin Houska and Ashutosh Bapat explained that partitionwise joins can reveal singleton cases later than base-relation sizing in #4 and #7, while Tom Lane proposed treating singleton AppendPaths specially instead of introducing a separate node type in #8.
- David implemented that direction in #13, adding proxy flags and translation lists to AppendPath and translating expressions during plan creation; separate demonstration changes converted regression tables into single-partition tables to expose differences from scanning the child directly.
- David's broader testing found missing grouping-set qual translation, fixed in #14, which also reused existing AppendRelInfo helpers; the demonstration tests were explicitly diagnostic material rather than intended commit contents.
- During the early rebases, David demonstrated that scanning through a partitioned parent still missed an inner-uniqueness optimization in #19; he and Ashutosh discussed propagating uniqueness information as future work in #21 and #22.
- The patch was adapted to parallel Append and parallel hash join changes in #17 and #23, followed by a postgres_fdw expected-output correction in #24 and another API adaptation in #25.
- Tomas Vondra tested the overhead improvement and questioned translation safety, proxy-path generality, and naming in #26; David explained the design and supplied clearer comments and the is_proxy rename in #28.
- Robert Haas explored using ProjectionPath and challenged the translation machinery in #29 and #32, while Tom Lane argued in #33 that removing redundant nodes in setrefs.c would avoid invasive createplan.c changes; David remained concerned about variable matching and lost planning opportunities in #37.
- After deprioritizing the work in #38, David revived it with a substantial rebase in #40, retaining the original architecture.
- Tomas renewed concerns about scattered translation calls in #41, and David explained the traversal difficulties and acknowledged that removing the final Append also sacrifices runtime pruning from one child to zero in #42; subsequent submissions through #47 maintained the patch against upstream changes.
- Tom supplied a much smaller implementation in #48 that retained the nodes until setrefs.c had resolved variable references, then removed them using cleanup shared with SubqueryScan; David accepted the approach in #49, replacing the earlier proxy infrastructure.
- David extended Tom's rewrite in #51 to handle singleton MergeAppend mark/restore and preserve ordered parallel paths, while leaving more aggressive projection handling and cost-function refactoring for separate consideration.
- Tom committed #51 as 8edd0e7946, with comment cleanup and a partial-path row-estimate adjustment, and announced the landing in #52; he declined extra projection complexity and left the proposed costing refactor unchanged.
- The thread ended with the singleton-node optimization committed and David acknowledging Tom as the main author in #53; uniqueness propagation, additional projection optimization, and the diagnostic regression-table conversions were not part of the landing.