RE: Parallel INSERT (INTO ... SELECT ...)

From: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Greg Nancarrow <gregn4422(at)gmail(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>, "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>
Subject: RE: Parallel INSERT (INTO ... SELECT ...)
Date: 2021-03-08 01:25:36
Message-ID: OS0PR01MB57166CBB0A9DA1EA22DEB20494939@OS0PR01MB5716.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> For now, I have left 0005 and 0006 patches, we can come back to those once we
> are done with the first set of patches. The first patch looks good to me and I
> think we can commit it and then bikeshed about GUC/reloption patch.
Hi,

I have a slight comment on 0001 patch.
+ * If the trigger type is RI_TRIGGER_FK, this indicates a FK exists in
+ * the relation, and this would result in creation of new CommandIds
+ * on insert/update/delete and this isn't supported in a parallel.

IMO, delete on a FK relation will not create new command id, so may be we can just memtion insert/update.
Attaching V24 patchset with the changes:

[0001]
Change the comment memtioned above.

[0002]
Temporarily replaced the option name "*_dml" with "*_insert" and adjusted the associated documents.

Best regards,
houzj

Attachment Content-Type Size
v24-0001-Enable-parallel-SELECT-for-INSERT-INTO-.-SELECT.patch application/octet-stream 65.7 KB
v24-0002-Add-new-GUC-option-enable_parallel_insert-boolean-a.patch application/octet-stream 19.6 KB
v24-0003-Parallel-SELECT-for-INSERT-INTO-.-SELECT-.-advan.patch application/octet-stream 45.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2021-03-08 01:34:45 Re: Extend more usecase for planning time partition pruning and init partition pruning.
Previous Message Tom Lane 2021-03-08 01:09:33 Re: 011_crash_recovery.pl intermittently fails