diff --git a/src/backend/executor/execExprInterp.c b/src/backend/executor/execExprInterp.c
index 9d6e25a..f597363 100644
*** a/src/backend/executor/execExprInterp.c
--- b/src/backend/executor/execExprInterp.c
*************** ExecEvalParamExec(ExprState *state, Expr
*** 2253,2285 ****
  }
  
  /*
-  * ExecEvalParamExecParams
-  *
-  * Execute the subplan stored in PARAM_EXEC initplans params, if not executed
-  * till now.
-  */
- void
- ExecEvalParamExecParams(Bitmapset *params, EState *estate)
- {
- 	ParamExecData *prm;
- 	int			paramid;
- 
- 	paramid = -1;
- 	while ((paramid = bms_next_member(params, paramid)) >= 0)
- 	{
- 		prm = &(estate->es_param_exec_vals[paramid]);
- 
- 		if (prm->execPlan != NULL)
- 		{
- 			/* Parameter not evaluated yet, so go do it */
- 			ExecSetParamPlan(prm->execPlan, GetPerTupleExprContext(estate));
- 			/* ExecSetParamPlan should have processed this param... */
- 			Assert(prm->execPlan == NULL);
- 		}
- 	}
- }
- 
- /*
   * Evaluate a PARAM_EXTERN parameter.
   *
   * PARAM_EXTERN parameters must be sought in ecxt_param_list_info.
--- 2253,2258 ----
diff --git a/src/backend/executor/execParallel.c b/src/backend/executor/execParallel.c
index ee0f07a..c93084e 100644
*** a/src/backend/executor/execParallel.c
--- b/src/backend/executor/execParallel.c
***************
*** 23,29 ****
  
  #include "postgres.h"
  
- #include "executor/execExpr.h"
  #include "executor/execParallel.h"
  #include "executor/executor.h"
  #include "executor/nodeAppend.h"
--- 23,28 ----
***************
*** 36,41 ****
--- 35,41 ----
  #include "executor/nodeIndexonlyscan.h"
  #include "executor/nodeSeqscan.h"
  #include "executor/nodeSort.h"
+ #include "executor/nodeSubplan.h"
  #include "executor/tqueue.h"
  #include "nodes/nodeFuncs.h"
  #include "optimizer/planmain.h"
*************** ExecInitParallelPlan(PlanState *planstat
*** 581,588 ****
  	char	   *query_string;
  	int			query_len;
  
! 	/* Force parameters we're going to pass to workers to be evaluated. */
! 	ExecEvalParamExecParams(sendParams, estate);
  
  	/* Allocate object for return value. */
  	pei = palloc0(sizeof(ParallelExecutorInfo));
--- 581,598 ----
  	char	   *query_string;
  	int			query_len;
  
! 	/*
! 	 * Force any initplan outputs that we're going to pass to workers to be
! 	 * evaluated, if they weren't already.
! 	 *
! 	 * For simplicity, we use the EState's per-output-tuple ExprContext here.
! 	 * That risks intra-query memory leakage, since we might pass through here
! 	 * many times before that ExprContext gets reset; but ExecSetParamPlan
! 	 * doesn't normally leak any memory in the context (see its comments), so
! 	 * it doesn't seem worth complicating this function's API to pass it a
! 	 * shorter-lived ExprContext.  This might need to change someday.
! 	 */
! 	ExecSetParamPlanMulti(sendParams, GetPerTupleExprContext(estate));
  
  	/* Allocate object for return value. */
  	pei = palloc0(sizeof(ParallelExecutorInfo));
*************** ExecParallelReinitialize(PlanState *plan
*** 831,838 ****
  	/* Old workers must already be shut down */
  	Assert(pei->finished);
  
! 	/* Force parameters we're going to pass to workers to be evaluated. */
! 	ExecEvalParamExecParams(sendParams, estate);
  
  	ReinitializeParallelDSM(pei->pcxt);
  	pei->tqueue = ExecParallelSetupTupleQueues(pei->pcxt, true);
--- 841,852 ----
  	/* Old workers must already be shut down */
  	Assert(pei->finished);
  
! 	/*
! 	 * Force any initplan outputs that we're going to pass to workers to be
! 	 * evaluated, if they weren't already (see comments in
! 	 * ExecInitParallelPlan).
! 	 */
! 	ExecSetParamPlanMulti(sendParams, GetPerTupleExprContext(estate));
  
  	ReinitializeParallelDSM(pei->pcxt);
  	pei->tqueue = ExecParallelSetupTupleQueues(pei->pcxt, true);
diff --git a/src/include/executor/execExpr.h b/src/include/executor/execExpr.h
index f7b1f77..02af68f 100644
*** a/src/include/executor/execExpr.h
--- b/src/include/executor/execExpr.h
*************** extern void ExecEvalFuncExprStrictFusage
*** 697,703 ****
  							 ExprContext *econtext);
  extern void ExecEvalParamExec(ExprState *state, ExprEvalStep *op,
  				  ExprContext *econtext);
- extern void ExecEvalParamExecParams(Bitmapset *params, EState *estate);
  extern void ExecEvalParamExtern(ExprState *state, ExprEvalStep *op,
  					ExprContext *econtext);
  extern void ExecEvalSQLValueFunction(ExprState *state, ExprEvalStep *op);
--- 697,702 ----
