model-writtenrun 7000 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jeff Janes reported that HashSetOp substantially exceeded its estimated memory consumption and proposed replacing it with enhanced hash joins to gain spilling, parallelism, and better estimates #1.
- Tom Lane opposed adding duplicate-counting complexity to hash joins and argued that estimation and spilling problems affected TupleHashTable users beyond SetOp #2.
- Tom identified omitted hash-table and counter overhead, posted a small BumpContext conversion to reduce allocation overhead, and proposed moving space estimation behind executor and simplehash interfaces #3.
- David Rowley outlined a possible join-plus-HashAgg implementation for non-ALL operations but doubted its general performance advantage, while Tom favored adding spilling to TupleHashTables for all users #4 #5.
- The allocator work initiated by #3 continued in thread #52539, where the later patchset #604504 supplied c106ef0807, expanding BumpContext use to other TupleHashTable callers, renaming contexts, centralizing resets, and removing an obsolete JIT check.
- Tom then submitted a separate pair of patches for realistic hash-table memory estimates and replacing long group counts with Cardinality, reporting accurate estimates for Jeff's example; a quick revision fixed a compiler warning and clarified comments #6 #7.
- David's review found missing fill-factor scaling and redundant bucket-count clamping; Tom incorporated those fixes and a clearer function reference, while retaining the tuple-alignment calculation and existing naming styles #8 #9.
- David approved the revised series, and Tom promised to push it #10 #11; both patches from #9 subsequently landed unchanged as 1ea5bdb00b and 8f29467c57.
- The estimation and Cardinality work landed as 1ea5bdb00b and 8f29467c57, complementing the allocator improvements committed through thread #52539; HashSetOp remains, and the broader TupleHashTable spilling proposal remains unimplemented in this thread #5.