summaryrefslogtreecommitdiff
path: root/src/include/nodes/execnodes.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-06-28 19:40:52 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-06-28 19:40:52 +0000
commit485375a1c9270fb3eefe4b9391dd976e563c2c1c (patch)
tree7c4d4c4600bcf1eb6142ca4962f5d0f65acbf7bb /src/include/nodes/execnodes.h
parentcfc710312e75e1d5ed49e42327a4e32386d6b142 (diff)
Fix hash aggregation to suppress unneeded columns from being stored in
tuple hash table entries. This addresses the problem previously noted that use of a 'physical tlist' in the input scan node could bloat the hash table entries far beyond what the planner expects. It's a better answer than my previous thought of undoing the physical tlist optimization, because we can also remove columns that are needed to compute the aggregate functions but aren't part of the grouping column set.
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r--src/include/nodes/execnodes.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 97deb8b15c7..1bedc6d26e0 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.151 2006/06/28 17:05:49 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.152 2006/06/28 19:40:52 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1245,6 +1245,8 @@ typedef struct AggState
HeapTuple grp_firstTuple; /* copy of first tuple of current group */
/* these fields are used in AGG_HASHED mode: */
TupleHashTable hashtable; /* hash table with one entry per group */
+ TupleTableSlot *hashslot; /* slot for loading hash table */
+ List *hash_needed; /* list of columns needed in hash table */
bool table_filled; /* hash table filled yet? */
TupleHashIterator hashiter; /* for iterating through hash table */
} AggState;