RE: Parallel INSERT SELECT take 2 - Mailing list pgsql-hackers

From houzj.fnst@fujitsu.com
Subject RE: Parallel INSERT SELECT take 2
Date
Msg-id OS0PR01MB5716F50BCC5722D17F721990943F9@OS0PR01MB5716.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Parallel INSERT SELECT take 2  (Greg Nancarrow <gregn4422@gmail.com>)
Responses Re: Parallel INSERT SELECT take 2
List pgsql-hackers
From: Greg Nancarrow <gregn4422@gmail.com>
Sent: Friday, May 28, 2021 4:42 PM
> On Mon, May 24, 2021 at 3:15 PM houzj.fnst@fujitsu.com
> <houzj.fnst@fujitsu.com> wrote:
> >
> >
> > Thanks for the comments and your descriptions looks good.
> > Attaching v5 patchset with all these changes.
> >
> 
> A few other minor things I noticed:
> 
> (1) error message wording when declaring a table SAFE for parallel DML
> 
> src/backend/commands/tablecmds.c
> 
> Since data modification for the RELKIND_FOREIGN_TABLE and
> RELPERSISTENCE_TEMP types are allowed in the parallel-restricted case (i.e.
> leader may modify in parallel mode) I'm thinking it may be better to use
> wording like:
> 
>     "cannot support foreign or temporary table data modification by parallel
> workers"
> 
> instead of
> 
>     "cannot support parallel data modification on a foreign or temporary table"
> 
> There are TWO places where this error message is used.
> 
> (What do you think?)

I think your change looks good.
I used your msg in the latest patchset.

> (2) Minor formatting issue
> 
> src/backend/optimizer/util/clauses.c
> 
>     static safety_object *make_safety_object(Oid objid, Oid classid, char
> proparallel)
> 
> should be:
> 
>     static safety_object *
>     make_safety_object(Oid objid, Oid classid, char proparallel)

Changed.
 
> (3) Minor formatting issue
>
> src/backend/utils/cache/typcache.c
> 
> 
>     List *GetDomainConstraints(Oid type_id)
> 
> should be:
> 
>     List *
>     GetDomainConstraints(Oid type_id)

Changed.

Attaching v6 patchset.
And I registered it in CF https://commitfest.postgresql.org/33/3143/,
comments are welcome.

Best regards,
houzj






Attachment

pgsql-hackers by date:

Previous
From: Greg Nancarrow
Date:
Subject: Re: Parallel Full Hash Join
Next
From: Andy Fan
Date:
Subject: Re: Regarding the necessity of RelationGetNumberOfBlocks for every rescan / bitmap heap scan.