model-writtenrun 2416 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jeff Davis proposed reducing TupleHashEntryData from 24 to 12 bytes through accessors, pointer relocation, status removal, and packing, reporting reduced memory consumption without a measurable speed change in #1.
- Heikki Linnakangas supported the approach, requested the conventional typedef, suggested placing additional data before the tuple, and discussed alignment and alternative tuple representations in #2; Jeff then proposed combining the actual per-group data with the tuple in #3, which Heikki supported while identifying the need for a tuple-copy interface change in #4.
- Jeff implemented combined tuple/data allocation using repalloc, added prerequisite cleanups, and extended packing to AggStatePerGroupData in #5.
- The typedef and unused-entrysize cleanups from #5 landed as 834c9e807c and 8a96faedc4, preserving their submitted changes.
- The remaining prerequisite cleanups from #5 landed as 32ddfaffd1, supplying the SetOp additional-data size, and 3f482940db, initializing aggregate counts earlier; Jeff then posted the rebased optimization remainder in #6.
- The combined-allocation component of #6 landed as e0ece2a981, with the accessor's memory-chunk assertion removed.
- David Rowley reported approximately 12–14% regressions for wider grouping keys and explained that repalloc also prevented Bump allocation in #7; Jeff announced that he would revert the change while seeking a better allocation API in #8.
- David raised a tuple-ownership concern in #9, Alvaro Herrera suggested a slot flag in #10, and Jeff clarified the copy API's ownership contract in #11, leading David to withdraw that concern in #12.
- Jeff replaced repalloc with ExecCopySlotMinimalTupleExtra() and incorporated Bump allocation in #13, reporting over 40% memory savings in his simple test while acknowledging an intermediate performance regression.
- Jeff tried avoiding the API change through ExecFetchSlotMinimalTuple() and moved additional data before the tuple in #14, but reported an approximately 6% EXCEPT regression; this version also omitted the status-removal and packing work without stating a reason for those omissions.
- Further Bump benchmarks showed memory savings but some by-reference aggregate slowdowns in #15; David then supplied portability, alignment, allocation-sizing, accessor-contract, and performance feedback in #16.
- Jeff incorporated that feedback, restored the tuple-copy API with extra space before the tuple, and added memory-accounting inlining in #17; subsequent measurements in #18 showed roughly 35% memory savings and a larger-query speed improvement despite mixed small-query results.
- The accessor creation and inlining components of #18 were combined into 4d143509cb, while its tuple-copy API component landed separately as a0942f441e, with their implementation changes preserved.
- The pointer-removal and copy-elimination components of #18 were combined into 626df47ad9, preserving the single allocation with additional data before the tuple.
- Jeff confirmed that the first six components, including Bump allocation, had landed in #19, leaving a revised MemoryContextMemAllocated() inlining patch that disabled recursion for two contexts but had not shown a major speedup.
- Peter Smith identified two comments still referring to removed fields in #20, prompting a0c7b76537; Jeff confirmed the correction in the final message #21, with no later resolution recorded for the memory-accounting remainder.