HashAgg: before spilling tuples, set unneeded columns to NULL.

Jeff Davis <jdavis@postgresql.org>

Commit: 2302302236a0c7aeba3377d78dd9d80ba53247df
Author: Jeff Davis <jdavis@postgresql.org>
Date: 2020-07-13T05:59:32Z
Releases: 14.0
HashAgg: before spilling tuples, set unneeded columns to NULL.

This is a replacement for 4cad2534. Instead of projecting all tuples
going into a HashAgg, only remove unnecessary attributes when actually
spilling. This avoids the regression for the in-memory case.

Discussion: https://postgr.es/m/a2fb7dfeb4f50aa0a123e42151ee3013933cb802.camel%40j-davis.com
Backpatch-through: 13

Files

PathChange+/−
src/backend/executor/nodeAgg.c modified +90 −33
src/include/nodes/execnodes.h modified +6 −2

Discussion