RE: A reloption for partitioned tables - parallel_workers

From: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: Seamus Abshere <seamus(at)abshere(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Subject: RE: A reloption for partitioned tables - parallel_workers
Date: 2021-02-23 06:12:28
Message-ID: OS0PR01MB57162CF450E45B52C9EB949694809@OS0PR01MB5716.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > 4. Maybe it also doesn't make sense to consider the parent relation's
> > parallel_workers if Parallel Append is disabled
> > (enable_parallel_append = off). That's because with a simple
> > (non-parallel) Append running under Gather, all launched parallel
> > workers process the same partition before moving to the next one.
> > OTOH, one's intention of setting parallel_workers on the parent
> > partitioned table would most likely be to distribute workers across
> > partitions, which is only possible with parallel Append
> > (enable_parallel_append = on). So, the new code should look like
> > this:
> >
> > if (IS_PARTITIONED_REL(rel) && enable_parallel_append)
> > parallel_workers = compute_parallel_worker(rel, -1, -1,
> > max_parallel_workers_per_gather);
>
> Here is an updated version of the Seamus' patch that takes into account these
> and other comments received on this thread so far.
> Maybe warrants adding some tests too but I haven't.
>
> Seamus, please register this patch in the next commit-fest:
> https://commitfest.postgresql.org/32/
>
> If you haven't already, you will need to create a community account to use that
> site.

It seems the patch does not include the code that get the parallel_workers from new struct " PartitionedTableRdOptions ",
Did I miss something ?

Best regards,
houzj

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2021-02-23 06:18:50 Re: [Doc Patch] Clarify that CREATEROLE roles can GRANT default roles
Previous Message Peter Eisentraut 2021-02-23 06:03:12 Re: pgsql: pg_collation_actual_version() -> pg_collation_current_version().