postgresql/src/backend/executor
Vadim B. Mikheev 51298bcfda Reset evaluation plan tuple table next free slot counter to 0
after ExecEndNode. It must be done! Or we'll be out of free
tuple slots very soon, though slots are freed by ExecEndNode
and ready for reusing.

We didn't see this problem before because of

int         nSlots = ExecCountSlotsNode(plan);
TupleTable  tupleTable = ExecCreateTupleTable(nSlots + 10);
    /* why add ten? - jolly */

code in InitPlan - i.e. extra 10 slots. Simple select uses
3 slots and so it was possible to re-use evaluation plan
3 additional times and didn't get

elog(NOTICE, "Plan requires more slots than are available");
elog(ERROR, "send mail to your local executor guru to fix this");

Changes are obvious and shouldn't be problems with them.
Though, I added Assert(epqstate->es_tupleTable->next == 0)
before EvalPlanQual():ExecInitNode and we'll notice if
something is still wrong. Is it better to change Assert
to elog(ERROR) ?
1999-06-09 12:23:42 +00:00
..
_deadcode Another pgindent run. Sorry folks. 1999-05-25 22:43:53 +00:00
execAmi.c pgindent run over code. 1999-05-25 16:15:34 +00:00
execFlatten.c Fix typo in comment. 1999-02-23 07:33:09 +00:00
execJunk.c Change resjunk to a boolean. 1999-05-17 17:03:51 +00:00
execMain.c Reset evaluation plan tuple table next free slot counter to 0 1999-06-09 12:23:42 +00:00
execProcnode.c Remove Tee code, move to _deadcode. 1999-03-23 16:51:04 +00:00
execQual.c Another pgindent run. Sorry folks. 1999-05-25 22:43:53 +00:00
execScan.c Change my-function-name-- to my_function_name, and optimizer renames. 1999-02-13 23:22:53 +00:00
execTuples.c pgindent run over code. 1999-05-25 16:15:34 +00:00
execUtils.c pgindent run over code. 1999-05-25 16:15:34 +00:00
functions.c pgindent run over code. 1999-05-25 16:15:34 +00:00
Makefile Remove Tee code, move to _deadcode. 1999-03-23 16:51:04 +00:00
nodeAgg.c Another pgindent run. Sorry folks. 1999-05-25 22:43:53 +00:00
nodeAppend.c pgindent run over code. 1999-05-25 16:15:34 +00:00
nodeGroup.c pgindent run over code. 1999-05-25 16:15:34 +00:00
nodeHash.c pgindent run over code. 1999-05-25 16:15:34 +00:00
nodeHashjoin.c Another pgindent run. Sorry folks. 1999-05-25 22:43:53 +00:00
nodeIndexscan.c pgindent run over code. 1999-05-25 16:15:34 +00:00
nodeMaterial.c pgindent run over code. 1999-05-25 16:15:34 +00:00
nodeMergejoin.c pgindent run over code. 1999-05-25 16:15:34 +00:00
nodeNestloop.c Change my-function-name-- to my_function_name, and optimizer renames. 1999-02-13 23:22:53 +00:00
nodeResult.c pgindent run over code. 1999-05-25 16:15:34 +00:00
nodeSeqscan.c pgindent run over code. 1999-05-25 16:15:34 +00:00
nodeSort.c Ensure consistent results when FormSortKeys fails to find 1999-06-03 03:17:37 +00:00
nodeSubplan.c pgindent run over code. 1999-05-25 16:15:34 +00:00
nodeUnique.c Change my-function-name-- to my_function_name, and optimizer renames. 1999-02-13 23:22:53 +00:00
spi.c Another pgindent run. Sorry folks. 1999-05-25 22:43:53 +00:00