Re: Determine parallel-safety of partition relations for Inserts - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Determine parallel-safety of partition relations for Inserts
Date
Msg-id CAA4eK1+s-MS4DLfimiUFQ6Pw+=PcYwV+xGcJCtb6p9_i_RrrPA@mail.gmail.com
Whole thread Raw
In response to RE: Determine parallel-safety of partition relations for Inserts  ("tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>)
Responses RE: Determine parallel-safety of partition relations for Inserts
List pgsql-hackers
On Mon, Jan 18, 2021 at 10:27 AM tsunakawa.takay@fujitsu.com
<tsunakawa.takay@fujitsu.com> wrote:
>
> From: Amit Kapila <amit.kapila16@gmail.com>
> > We already allow users to specify the degree of parallelism for all
> > the parallel operations via guc's max_parallel_maintenance_workers,
> > max_parallel_workers_per_gather, then we have a reloption
> > parallel_workers and vacuum command has the parallel option where
> > users can specify the number of workers that can be used for
> > parallelism. The parallelism considers these as hints but decides
> > parallelism based on some other parameters like if there are that many
> > workers available, etc. Why the users would expect differently for
> > parallel DML?
>
> I agree that the user would want to specify the degree of parallelism of DML, too.  My simple (probably silly)
questionwas, in INSERT SELECT,
 
>
> * If the target table has 10 partitions and the source table has 100 partitions, how would the user want to specify
parameters?
>
> * If the source and target tables have the same number of partitions, and the user specified different values to
parallel_workersand parallel_dml_workers, how many parallel workers would run?
 
>

Good question. I think if we choose to have a separate parameter for
DML, it can probably a boolean to just indicate whether to enable
parallel DML for a specified table and use the parallel_workers
specified in the table used in SELECT.

-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Improve handling of parameter differences in physical replication
Next
From: "tsunakawa.takay@fujitsu.com"
Date:
Subject: RE: Determine parallel-safety of partition relations for Inserts