postgresql/src/include/nodes
Andres Freund 84ad4b036d Reduce memory usage of targetlist SRFs.
Previously nodeProjectSet only released memory once per input tuple,
rather than once per returned tuple. If the computation of an
individual returned tuple requires a lot of memory, that can lead to
problems.

Instead change things so that the expression context can be reset once
per output tuple, which requires a new memory context to store SRF
arguments in.

This is a longstanding issue, but was hard to fix before 9.6, due to
the way tSRFs where evaluated. But it's fairly easy to fix now. We
could backpatch this into 10, but given there've been fewc omplaints
that doesn't seem worth the risk so far.

Reported-By: Lucas Fairchild
Author: Andres Freund, per discussion with Tom Lane
Discussion: https://postgr.es/m/4514.1507318623@sss.pgh.pa.us
2017-10-08 15:08:25 -07:00
..
bitmapset.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
execnodes.h Reduce memory usage of targetlist SRFs. 2017-10-08 15:08:25 -07:00
extensible.h Basic partition-wise join functionality. 2017-10-06 11:11:10 -04:00
lockoptions.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
makefuncs.h Allow multiple tables to be specified in one VACUUM or ANALYZE command. 2017-10-03 18:53:44 -04:00
memnodes.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
nodeFuncs.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
nodes.h Allow multiple tables to be specified in one VACUUM or ANALYZE command. 2017-10-03 18:53:44 -04:00
params.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
parsenodes.h Allow multiple tables to be specified in one VACUUM or ANALYZE command. 2017-10-03 18:53:44 -04:00
pg_list.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
plannodes.h Force rescanning of parallel-aware scan nodes below a Gather[Merge]. 2017-08-30 09:29:55 -04:00
primnodes.h Support arrays over domains. 2017-09-30 13:40:56 -04:00
print.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
readfuncs.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
relation.h Basic partition-wise join functionality. 2017-10-06 11:11:10 -04:00
replnodes.h Add a WAIT option to DROP_REPLICATION_SLOT 2017-09-01 13:44:14 +02:00
tidbitmap.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
value.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00