model-writtenrun 8254 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andres Freund reported an approximately 12% regression in in-memory hash aggregation and traced it to extra calls, repeated state loads and branching introduced by spill support, proposing a simpler lookup path in #1.
- Jeff Davis explained that the original structure preserved calculated hashes for spilled tuples, then agreed that returning the hash through the lookup API could retain that benefit without the extra call in #3 and #4.
- Jeff posted the hash-lookup refactoring in #6 and reported that it nearly eliminated his measured regression in #8.
- Andres tested and revised the patch in #9, moving the hash output assignment after insertion to avoid a pipeline stall and adding local optimizations; he also identified forced CP_SMALL_TLIST projection as a separate remaining slowdown.
- Jeff proposed projecting only spilled tuples in #10, while Tomas Vondra supported replacing unconditional projection in #11; Andres subsequently proposed reverting first and revisiting selective projection for PostgreSQL 14 in #15.
- Tomas warned that reverting without a replacement would substantially increase spill I/O in #17, Robert Haas shared that concern in #18, and Tom Lane urged treating it as a PostgreSQL 13 open issue in #19.
- Jeff adapted Melanie Plageman's earlier work into #20, collecting needed columns and copying only those attributes into a spill slot, reporting that this preserved space savings without penalizing the in-memory case.
- Andres criticized executor-side column discovery in #22 and suggested planner locations in #24; Melanie consequently moved discovery into set_upper_references() in #25, while Tomas cautioned against making extraction depend on group-count estimates in #26.
- On July 13, Jeff committed the agreed rollback as 0babd10980 and the executor-side spill-only projection from #20 as 2302302236; Melanie's planner relocation was not included.
- Andres reported that the independent hash-lookup regression remained unresolved in #27, prompting Peter Geoghegan to reopen a separate performance item in #28 after previously assuming the projection fix resolved everything.
- Peter rebased Andres's hash-lookup patch and measured an improvement from approximately 11.46 to 10.64 seconds in #29; Jeff committed that attachment unchanged as 200f6100a9 and confirmed the landing in #30.
- The thread ended with Peter's acknowledgment in #31, with both identified regression fixes landed and no further resolution recorded for the planner relocation proposed in #25.