Re: A GUC to prevent leader processes from running subplans?

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-11-12T07:51:54Z
Lists: pgsql-hackers
On Sun, Nov 12, 2017 at 9:18 AM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:
> On Sat, Oct 21, 2017 at 8:09 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> On Tue, Oct 17, 2017 at 7:27 AM, Thomas Munro
>> <thomas.munro@enterprisedb.com> wrote:
>>
>> I don't think overloading force_parallel_mode is a good idea, but
>> having some other GUC for this seems OK to me.  Not sure I like
>> multiplex_gather, though.
>
> How about parallel_leader_participation = on|off?  The attached
> version has it that way, and adds regression tests to exercise on, off
> and off-but-couldn't-start-any-workers for both kinds of gather node.
>
> I'm not sure why node->need_to_rescan is initialised by both
> ExecGatherInit() and ExecGather().  Only the latter's value matters,
> right?
>

I don't see anything like need_to_rescan in the GatherState node.  Do
you intend to say need_to_scan_locally?  If yes, then I think whatever
you said is right.


> I've added this to the January Commitfest.
>

+1 to this idea.  Do you think such an option at table level can be
meaningful?  We have a parallel_workers as a storage option for
tables, so users might want leader to participate in parallelism only
for some of the tables.


-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


Commits

  1. Fix typo.

  2. Add parallel_leader_participation GUC.