Re: Assumptions about the number of parallel workers

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Antonin Houska <ah(at)cybertec(dot)at>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assumptions about the number of parallel workers
Date: 2020-02-07 15:18:25
Message-ID: CA+TgmobH39kxu2U2UvEhtecvU6j-9uq_49iEKpNenB6d14bgUA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 5, 2020 at 4:49 AM Antonin Houska <ah(at)cybertec(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexey Bashtanov 2020-02-07 15:22:12 Re: improve transparency of bitmap-only heap scans
Previous Message Robert Haas 2020-02-07 15:15:10 Re: [Proposal] Global temporary tables