RE: Parallel INSERT SELECT take 2

From: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Greg Nancarrow <gregn4422(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: RE: Parallel INSERT SELECT take 2
Date: 2021-04-28 02:44:18
Message-ID: OS0PR01MB5716B7599AF108C10556E2D894409@OS0PR01MB5716.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Attaching new version patches with the following change:

0002:
1): Change "ALTER/CREATE TABLE PARALLEL SAFE" to "ALTER/CREATE TABLE PARALLEL DML SAFE"
2): disallow temp/foreign table to be parallel safe.

0003:
1) Temporarily, add the check of built-in function by adding a member for proparallel in FmgrBuiltin.
To avoid enlarging FmgrBuiltin struct , change the existing bool members strict and and retset into
one member of type char, and represent the original values with some bit flags.

Note: this will lock down the parallel property of built-in function, but, I think the parallel safety of built-in function
is related to the C code, user should not change the property of it unless they change its code. So, I think it might be
better to disallow changing parallel safety for built-in functions, Thoughts ?

I have not added the parallel safety check in ALTER/CREATE table PARALLEL DML SAFE command.
I think it seems better to add it after some more discussion.

Best regards,
houzj

Attachment Content-Type Size
v2-POC-0004-fix-testcase-with-wrong-parallel-safety-flag.patch application/octet-stream 10.2 KB
v2-POC-0001-get-parallel-safety-function.patch application/octet-stream 30.0 KB
v2-POC-0002-CREATE-ALTER-TABLE-PARALLEL-DML.patch application/octet-stream 39.4 KB
v2-POC-0003-check-parallel-safety-in-fmgr_info.patch application/octet-stream 42.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2021-04-28 02:53:08 Re: Bug fix for tab completion of ALTER TABLE ... VALIDATE CONSTRAINT ...
Previous Message Alvaro Herrera 2021-04-28 01:18:12 Re: Unresolved repliaction hang and stop problem.