Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e4e87a3

Browse files
author
Amit Kapila
committed
Fix valgrind issue in commit 05c8482.
Initialize other newly added variables in max_parallel_hazard_context via is_parallel_safe() because we don't check the parallel-safety of target relations in that function. Reported-by: Tom Lane as per buildfarm Author: Amit Kapila Discussion: https://postgr.es/m/[email protected]
1 parent 05c8482 commit e4e87a3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/backend/optimizer/util/clauses.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,9 +614,10 @@ is_parallel_safe(PlannerInfo *root, Node *node)
614614
context.max_hazard = PROPARALLEL_SAFE;
615615
context.max_interesting = PROPARALLEL_RESTRICTED;
616616
context.safe_param_ids = NIL;
617-
context.command_type = node != NULL && IsA(node, Query) ?
618-
castNode(Query, node)->commandType : CMD_UNKNOWN;
619-
context.planner_global = root->glob;
617+
/* We don't need to evaluate target relation's parallel-safety here. */
618+
context.target_rte = NULL;
619+
context.command_type = CMD_UNKNOWN;
620+
context.planner_global = NULL;
620621

621622
/*
622623
* The params that refer to the same or parent query level are considered

0 commit comments

Comments
 (0)