]> granicus.if.org Git - postgresql/commit
Reset, not recreate, execGrouping.c style hashtables.
authorAndres Freund <andres@anarazel.de>
Sat, 9 Feb 2019 08:35:57 +0000 (00:35 -0800)
committerAndres Freund <andres@anarazel.de>
Sat, 9 Feb 2019 09:05:49 +0000 (01:05 -0800)
commit356687bd825e5ca7230d43c1bffe7a59ad2e77bd
treebe80a6148a4164edae691341e586a604b39775d9
parent317ffdfeaac12e434b2befa24993dc1b52a140fd
Reset, not recreate, execGrouping.c style hashtables.

This uses the facility added in the preceding commit to fix
performance issues caused by rebuilding the hashtable (with its
comparator expression being the most expensive bit), after every
reset. That's especially important when the comparator is JIT
compiled.

Bug: #15592 #15486
Reported-By: Jakub Janeček, Dmitry Marakasov
Author: Andres Freund
Discussion:
    https://postgr.es/m/15486-05850f065da42931@postgresql.org
    https://postgr.es/m/20190114180423.ywhdg2iagzvh43we@alap3.anarazel.de
Backpatch: 11, where I broke this in bf6c614a2f2c5
src/backend/executor/nodeAgg.c
src/backend/executor/nodeRecursiveunion.c
src/backend/executor/nodeSetOp.c
src/backend/executor/nodeSubplan.c