Re: Assumptions about the number of parallel workers

2020-02-07 Thread Andres Freund
Hi, On 2020-02-07 09:44:34 +0100, Antonin Houska wrote: > Those Gather nodes still have non-zero num_workers, see this part of > standard_planner: > > if (force_parallel_mode != FORCE_PARALLEL_OFF && top_plan->parallel_safe) > { > ... > gather->num_workers = 1; > gather-

Re: Assumptions about the number of parallel workers

2020-02-07 Thread Robert Haas
On Wed, Feb 5, 2020 at 4:49 AM Antonin Houska wrote: > I can't figure out why ExecGather/ExecGatherMerge do check whether num_workers > is non-zero. I think the code would be a bit clearer if these tests were > replaced with Assert() statements, as the attached patch does. Hmm. There are some cas

Re: Assumptions about the number of parallel workers

2020-02-07 Thread Antonin Houska
Andres Freund wrote: > Hi, > > On 2020-02-05 10:50:05 +0100, Antonin Houska wrote: > > I can't figure out why ExecGather/ExecGatherMerge do check whether > > num_workers > > is non-zero. I think the code would be a bit clearer if these tests were > > replaced with Assert() statements, as the at

Re: Assumptions about the number of parallel workers

2020-02-05 Thread Andres Freund
Hi, On 2020-02-05 10:50:05 +0100, Antonin Houska wrote: > I can't figure out why ExecGather/ExecGatherMerge do check whether num_workers > is non-zero. I think the code would be a bit clearer if these tests were > replaced with Assert() statements, as the attached patch does. It's probably relate