Skip to content

Commit 65a603e

Browse files
committed
Guard against parallel-restricted functions in VALUES expressions.
Obvious brain fade in set_rel_consider_parallel(). Noticed it while adjusting the adjacent RTE_FUNCTION case. In 9.6, also make the code look more like what I just did in HEAD by removing the unnecessary function_rte_parallel_ok subroutine (it does nothing that expression_tree_walker wouldn't do).
1 parent da1c916 commit 65a603e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/backend/optimizer/path/allpaths.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -599,11 +599,9 @@ set_rel_consider_parallel(PlannerInfo *root, RelOptInfo *rel,
599599
break;
600600

601601
case RTE_VALUES:
602-
603-
/*
604-
* The data for a VALUES clause is stored in the plan tree itself,
605-
* so scanning it in a worker is fine.
606-
*/
602+
/* Check for parallel-restricted functions. */
603+
if (!is_parallel_safe(root, (Node *) rte->values_lists))
604+
return;
607605
break;
608606

609607
case RTE_CTE:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy