Re: Assumptions about the number of parallel workers - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Assumptions about the number of parallel workers
Date
Msg-id CA+TgmobH39kxu2U2UvEhtecvU6j-9uq_49iEKpNenB6d14bgUA@mail.gmail.com
Whole thread Raw
In response to Assumptions about the number of parallel workers  (Antonin Houska <ah@cybertec.at>)
List pgsql-hackers
On Wed, Feb 5, 2020 at 4:49 AM Antonin Houska <ah@cybertec.at> 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 cases where we plan on using a Gather node but
then can't actually fire up parallelism because we run out of DSM
segments or we run out of background workers. But the Gather is just
part of the plan, so it would still have num_workers > 0 in those
cases. This might just have been a thinko on my part, but I'm not
totally sure.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [Proposal] Global temporary tables
Next
From: Alexey Bashtanov
Date:
Subject: Re: improve transparency of bitmap-only heap scans