nodeSetOp.c: missing additionalsize for BuildTupleHashTable().
authorJeff Davis <[email protected]>
Tue, 7 Jan 2025 22:55:53 +0000 (14:55 -0800)
committerJeff Davis <[email protected]>
Tue, 7 Jan 2025 22:55:53 +0000 (14:55 -0800)
Provide additionalsize argument, which can affect the calculations for
'nbuckets'. Also, future work for Hash Aggregation will rely on the
correct additionalsize.

Discussion: https://postgr.es/m/7530bd8783b1a78d53a3c70383e38d8da0a5ffe5.camel%40j-davis.com

src/backend/executor/nodeSetOp.c

index bea30d6c8f0bbf0bf9902cc6f2c3f14e768082f7..5b7ff9c374850db6ab451252bbada724a39d39bc 100644 (file)
@@ -104,7 +104,7 @@ build_hash_table(SetOpState *setopstate)
                                                                                                setopstate->hashfunctions,
                                                                                                node->cmpCollations,
                                                                                                node->numGroups,
-                                                                                               0,
+                                                                                               sizeof(SetOpStatePerGroupData),
                                                                                                setopstate->ps.state->es_query_cxt,
                                                                                                setopstate->tableContext,
                                                                                                econtext->ecxt_per_tuple_memory,