postgresql/src/include/executor
Andres Freund 317ffdfeaa Allow to reset execGrouping.c style tuple hashtables.
This has the advantage that the comparator expression, the table's
slot, etc do not have to be rebuilt. Additionally the simplehash.h
hashtable within the tuple hashtable now keeps its previous size and
doesn't need to be reallocated. That both reduces allocator overhead,
and improves performance in cases where the input estimation was off
by a significant factor.

To avoid an API/ABI break, the new parameter is exposed via the new
BuildTupleHashTableExt(), and BuildTupleHashTable() now is a wrapper
around the former, that continues to allocate the table itself in the
tablecxt.

Using this fixes performance issues discovered in the two bugs
referenced. This commit however has not converted the callers, that's
done in a separate commit.

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, this is a prerequisite for other fixes
2019-02-09 01:05:49 -08:00
..
execExpr.h Renaming for new subscripting mechanism 2019-02-01 12:50:32 -03:00
execParallel.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
execPartition.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
execdebug.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
execdesc.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
executor.h Allow to reset execGrouping.c style tuple hashtables. 2019-02-09 01:05:49 -08:00
functions.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
hashjoin.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
instrument.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeAgg.h Change function call information to be variable length. 2019-01-26 14:17:52 -08:00
nodeAppend.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeBitmapAnd.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeBitmapHeapscan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeBitmapIndexscan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeBitmapOr.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeCtescan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeCustom.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
nodeForeignscan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeFunctionscan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeGather.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeGatherMerge.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeGroup.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeHash.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeHashjoin.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeIndexonlyscan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeIndexscan.h Don't include genam.h from execnodes.h and relscan.h anymore. 2019-01-14 17:02:12 -08:00
nodeLimit.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeLockRows.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeMaterial.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeMergeAppend.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeMergejoin.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeModifyTable.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeNamedtuplestorescan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeNestloop.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeProjectSet.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeRecursiveunion.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeResult.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeSamplescan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeSeqscan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeSetOp.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeSort.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeSubplan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeSubqueryscan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeTableFuncscan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeTidscan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeUnique.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeValuesscan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeWindowAgg.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeWorktablescan.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
spi.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
spi_priv.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
tablefunc.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
tqueue.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
tstoreReceiver.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
tuptable.h Update copyright for 2019 2019-01-02 12:44:25 -05:00