postgresql/src/include/nodes
Andres Freund 277cb78983 Don't reuse slots between root and partition in ON CONFLICT ... UPDATE.
Until now the the slot to store the conflicting tuple, and the result
of the ON CONFLICT SET, where reused between partitions. That
necessitated changing slots descriptor when switching partitions.

Besides the overhead of switching descriptors on a slot (which
requires memory allocations and prevents JITing), that's importantly
also problematic for tableam. There individual partitions might belong
to different tableams, needing different kinds of slots.

In passing also fix ExecOnConflictUpdate to clear the existing slot at
exit. Otherwise that slot could continue to hold a pin till the query
ends, which could be far too long if the input data set is large, and
there's no further conflicts. While previously also problematic, it's
now more important as there will be more such slots when partitioned.

Author: Andres Freund
Reviewed-By: Robert Haas, David Rowley
Discussion: https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de
2019-03-06 15:43:33 -08:00
..
bitmapset.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
execnodes.h Don't reuse slots between root and partition in ON CONFLICT ... UPDATE. 2019-03-06 15:43:33 -08:00
extensible.h Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
lockoptions.h Don't include heapam.h from others headers. 2019-01-14 16:24:41 -08:00
makefuncs.h Make some small planner API cleanups. 2019-01-29 15:26:44 -05:00
memnodes.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodeFuncs.h Make some small planner API cleanups. 2019-01-29 15:26:44 -05:00
nodes.h tableam: introduce table AM infrastructure. 2019-03-06 09:54:38 -08:00
params.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
parsenodes.h tableam: introduce table AM infrastructure. 2019-03-06 09:54:38 -08:00
pathnodes.h Simplify the planner's new representation of indexable clauses a little. 2019-02-14 19:37:30 -05:00
pg_list.h Standardize some more loops that chase down parallel lists. 2019-02-28 14:25:01 -05:00
plannodes.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
primnodes.h tableam: introduce table AM infrastructure. 2019-03-06 09:54:38 -08:00
print.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
readfuncs.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
replnodes.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
supportnodes.h Allow extensions to generate lossy index conditions. 2019-02-11 21:26:14 -05:00
tidbitmap.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
value.h Update copyright for 2019 2019-01-02 12:44:25 -05:00