Disk-based hash aggregation
Hash aggregation spilling to disk when it exceeds memory, with hash_mem_multiplier. Introduced in PostgreSQL 13.
Versions
- PostgreSQL 20 · worked-on · improved · moderate
- PostgreSQL 19 · worked-on · improved · moderate
- PostgreSQL 18 · shipped · improved · moderate · 11 commits · +352 / -145 lines
Threads
- HashAggregate loses worker spill stats on rescan
- Hash aggregation shows only the last execution's stats for parallel workers
- Hash aggregate collisions cause excessive spilling
- BUG #19882: Parallel HashAggregate loses worker spill statistics after Gather rescan
- Improve hash aggregate spilling by writing only the needed columns
- Reduce TupleHashEntryData struct size by half
- Fix outdated code comments in nodeAgg.c
- Incorrect CHUNKHDRSZ in nodeAgg.c
- HashAgg degenerate case
- Possible typo in nodeAgg.c
- Avoid a possible overflow (src/backend/utils/sort/logtape.c)
- Time to increase hash_mem_multiplier default?
- Postgress 13.x: wrong result for delete with subquery
- BUG #16784: Server crash in ExecReScanAgg()
- don't allocate HashAgg hash tables when running explain only
- logtape.c stats don't account for unused "prefetched" block numbers
- Disk-based hash aggregate's cost model
- Default setting for enable_hashagg_disk
- pg13dev: explain partial, parallel hashagg, and memory use
- HashAgg's batching counter starts at 0, but Hash's starts at 1.
- hashagg slowdown due to spill changes
- Open Item: Should non-text EXPLAIN always show properties?
- Missing HashAgg EXPLAIN ANALYZE details for parallel plans
- Make MemoryContextMemAllocated() more precise
- Trouble with hashagg spill I/O pattern and costing
- significant slowdown of HashAggregate between 9.6 and 10
- Memory-Bounded Hash Aggregation
- AllocSetEstimateChunkSpace()
- pgsql: Disk-based Hash Aggregation.
- Memory Accounting
- Allow simplehash to use already-calculated hash values
- Spilling hashed SetOps and aggregates to disk