aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorAndrew Gierth <rhodiumtoad@postgresql.org>2019-05-23 15:26:01 +0100
committerAndrew Gierth <rhodiumtoad@postgresql.org>2019-05-23 15:26:01 +0100
commit44e95b5728a4569c494fa4ea4317f8a2f50a206b (patch)
tree3b5097bdb9274baae68c998b111a3314e6415f3e /src/backend/executor/nodeModifyTable.c
parent156c0c2dff403fd115f3a5f6d73ab80959c84129 (diff)
downloadpostgresql-44e95b5728a4569c494fa4ea4317f8a2f50a206b.tar.gz
postgresql-44e95b5728a4569c494fa4ea4317f8a2f50a206b.zip
Fix array size allocation for HashAggregate hash keys.
When there were duplicate columns in the hash key list, the array sizes could be miscomputed, resulting in access off the end of the array. Adjust the computation to ensure the array is always large enough. (I considered whether the duplicates could be removed in planning, but I can't rule out the possibility that duplicate columns might have different hash functions assigned. Simpler to just make sure it works at execution time regardless.) Bug apparently introduced in fc4b3dea2 as part of narrowing down the tuples stored in the hashtable. Reported by Colm McHugh of Salesforce, though I didn't use their patch. Backpatch back to version 10 where the bug was introduced. Discussion: https://postgr.es/m/CAFeeJoKKu0u+A_A9R9316djW-YW3-+Gtgvy3ju655qRHR3jtdA@mail.gmail.com
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions