Re: Choosing parallel_degree

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Julien Rouhaud <julien(dot)rouhaud(at)dalibo(dot)com>
Cc: James Sewell <james(dot)sewell(at)lisasoft(dot)com>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Paul Ramsey <pramsey(at)cleverelephant(dot)ca>, Andreas Ulbrich <andreas(dot)ulbrich(at)matheversum(dot)de>
Subject: Re: Choosing parallel_degree
Date: 2016-04-05 04:19:47
Message-ID: CAA4eK1JsU90w-JVw2EiKgpoEj0tkTzwwdboFr0Km2zpL8XN8wA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 4, 2016 at 11:39 PM, Julien Rouhaud <julien(dot)rouhaud(at)dalibo(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-04-05 04:54:56 Re: Combining Aggregates
Previous Message Michael Paquier 2016-04-05 03:58:13 Re: BUG #13755: pgwin32_is_service not checking if SECURITY_SERVICE_SID is disabled