From 1f39bce021540fde00990af55b4432c55ef4b3c7 Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Wed, 18 Mar 2020 15:42:02 -0700 Subject: Disk-based Hash Aggregation. While performing hash aggregation, track memory usage when adding new groups to a hash table. If the memory usage exceeds work_mem, enter "spill mode". In spill mode, new groups are not created in the hash table(s), but existing groups continue to be advanced if input tuples match. Tuples that would cause a new group to be created are instead spilled to a logical tape to be processed later. The tuples are spilled in a partitioned fashion. When all tuples from the outer plan are processed (either by advancing the group or spilling the tuple), finalize and emit the groups from the hash table. Then, create new batches of work from the spilled partitions, and select one of the saved batches and process it (possibly spilling recursively). Author: Jeff Davis Reviewed-by: Tomas Vondra, Adam Lee, Justin Pryzby, Taylor Vesely, Melanie Plageman Discussion: https://postgr.es/m/507ac540ec7c20136364b5272acbcd4574aa76ef.camel@j-davis.com --- doc/src/sgml/config.sgml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 672bf6f1ee7..70854ae2986 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -4482,6 +4482,23 @@ ANY num_sync ( + enable_groupingsets_hash_disk (boolean) + + enable_groupingsets_hash_disk configuration parameter + + + + + Enables or disables the query planner's use of hashed aggregation plan + types for grouping sets when the total size of the hash tables is + expected to exceed work_mem. See . The default is + off. + + + + enable_hashagg (boolean) @@ -4496,6 +4513,21 @@ ANY num_sync ( + enable_hashagg_disk (boolean) + + enable_hashagg_disk configuration parameter + + + + + Enables or disables the query planner's use of hashed aggregation plan + types when the memory usage is expected to exceed + work_mem. The default is on. + + + + enable_hashjoin (boolean) -- cgit v1.2.3