Re: Choosing parallel_degree - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Choosing parallel_degree
Date
Msg-id CAA4eK1JsU90w-JVw2EiKgpoEj0tkTzwwdboFr0Km2zpL8XN8wA@mail.gmail.com
Whole thread Raw
In response to Re: Choosing parallel_degree  (Julien Rouhaud <julien.rouhaud@dalibo.com>)
Responses Re: Choosing parallel_degree  (Julien Rouhaud <julien.rouhaud@dalibo.com>)
List pgsql-hackers
On Mon, Apr 4, 2016 at 11:39 PM, Julien Rouhaud <julien.rouhaud@dalibo.com> wrote:
>
> On 04/04/2016 17:03, Julien Rouhaud wrote:
> > On 04/04/2016 08:55, Amit Kapila wrote:
> >
> > Thanks for the review!
> >
> >> Few comments:
> >> 1.
> >> +      limited according to the <xref linkend="gux-max-parallel-degree">
> >>
> >> A. typo.
> >>    /gux-max-parallel-degree/guc-max-parallel-degree
> >>    /worker/workers
> >
> > Oops, fixed.
> >
>
> And I managed to no fix it, sorry :/ Thanks to Andreas who warned me.
>

Few more comments:

1.
@@ -909,6 +909,17 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI
    
</varlistentry>
 
    <varlistentry>
+    <term><literal>parallel_degree</> (<type>integer</>)</term>
+    <listitem>
+     
<para>
+     Sets the degree of parallelism for an individual relation.  The requested
+     number of workers will be 
limited by <xref
+     linkend="guc-max-parallel-degree">.
+     </para>
+    </listitem>
+   </varlistentry>

All other parameters in this category are supportted by Alter table command as well, so I think this parameter should also be supported by Alter Table command (for both SET and RESET variants).

2.
+ "Number of parallel processes per executor node wanted for this relation.",

How about
Number of parallel processes that can be used for this relation per executor node.

3.
- if (rel->pages < parallel_threshold && rel->reloptkind == RELOPT_BASEREL)
+ if (rel->pages < 
parallel_threshold && rel->rel_parallel_degree == -1 &&
+ rel->reloptkind == RELOPT_BASEREL)

A. Second line should be indented with the begin of first line after bracket '(' which means with rel->pages.  Refer multiline condition in near by code.  Or you can run pgindent.
B. The comment above this condition needs slight adjustment as per new condition.

4.
+ int parallel_degree; /* max number of parallel worker */
 } StdRdOptions;

Typo in comments
/worker/workers


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

pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: Timeline following for logical slots
Next
From: Robert Haas
Date:
Subject: Re: Combining Aggregates