Assumptions about the number of parallel workers

From: Antonin Houska <ah(at)cybertec(dot)at>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Assumptions about the number of parallel workers
Date: 2020-02-05 09:50:05
Message-ID: 36697.1580896205@antos
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

In addition, if my assumptions are correct, I think that only Gather node
needs the single_copy field, but GatherPath does not.

In the patch I also added Assert() to add_partial_path so that I'm more likely
to catch special cases. Regression tests passed though.

--
Antonin Houska
Web: https://www.cybertec-postgresql.com

Attachment Content-Type Size
num_workers_checks.patch text/x-diff 5.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message 曾文旌 (义从) 2020-02-05 09:51:48 Re: [Proposal] Global temporary tables
Previous Message Arseny Sher 2020-02-05 09:04:06 Re: ERROR: subtransaction logged without previous top-level txn record