diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index fa7a5f8..3e7c472 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -268,6 +268,12 @@ standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams) * to assume that the same serialization level will be in effect at plan * time and execution time, so don't generate a parallel plan if we're in * serializable mode. + * + * Note that we don't verify here whether max_parallel_workers > 0. If + * you set max_parallel_workers_per_gather > max_parallel_workers, you + * might get some plans that will never succeed in obtaining the number of + * workers for which they planned. If that bothers you, don't do it. It's + * actually quite useful to do that for testing purposes, though. */ if ((cursorOptions & CURSOR_OPT_PARALLEL_OK) != 0 && IsUnderPostmaster &&