Explicitly track if a subplan has been executed and a valid value is computed
authorPavan Deolasee <pavan.deolasee@gmail.com>
Wed, 20 Jul 2016 10:06:14 +0000 (15:36 +0530)
committerPavan Deolasee <pavan.deolasee@gmail.com>
Wed, 20 Jul 2016 10:11:48 +0000 (15:41 +0530)
commita5b53b0dda5254c26e78d0e978d3667d3800401e
tree591c27bb9e4d45852a76da23f2fcda8548f1da72
parentef524fc1af21a9b30805659d743485471dc60c22
Explicitly track if a subplan has been executed and a valid value is computed
or not.

This works around a problem noted in issue #102, but not a full solution to the
problem. It seems there are places where InitPlan is attached to a node which
will be executed on the remote node. Even so coordinator tries to find push a
PARAM_EXEC parameter value for a remote subplan and fails because the value is
not and will never be computed on the coordinator. We for now send NULL value
for such cases to avoid a server crash
src/backend/executor/nodeNestloop.c
src/backend/executor/nodeSubplan.c
src/backend/pgxc/pool/execRemote.c
src/include/nodes/params.h