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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Greg Nancarrow <gregn4422(at)gmail(dot)com>
Cc: Amit Langote <amitlangote09(at)gmail(dot)com>, "Hou, Zhijie" <houzj(dot)fnst(at)cn(dot)fujitsu(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, Takayuki" <tsunakawa(dot)takay(at)fujitsu(dot)com>, "Tang, Haiying" <tanghy(dot)fnst(at)cn(dot)fujitsu(dot)com>
Subject: Re: Parallel INSERT (INTO ... SELECT ...)
Date: 2021-03-06 10:19:05
Message-ID: CAA4eK1+8ABa04U63r3koQ1zPy=86kVVsyD-JBk9TrLKDUx=nhg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 5, 2021 at 6:34 PM Greg Nancarrow <gregn4422(at)gmail(dot)com> wrote:
>
> For the time being at least, I am posting an updated set of patches,
> as I found that the additional parallel-safety checks on DOMAIN check
> constraints to be somewhat inefficient and could also be better
> integrated into max_parallel_hazard(). I also updated the basic tests
> with a test case for this.
>

Thanks, your changes look good to me. I went ahead and changed the
patch to track the partitionOids once rather than in two separate
lists and use that list in PlanCacheRelCallback to invalidate the
plans. I made few other changes:
a. don't need to retain the lock on indexes as we can't change index expressions
b. added/updated comments at few places in the code.
c. made a few other cosmetic changes
d. ran pgindent
e. slightly modify the commit message.
f. combine the code and test case patch

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.

--
With Regards,
Amit Kapila.

Attachment Content-Type Size
v23-0001-Enable-parallel-SELECT-for-INSERT-INTO-.-SELECT.patch application/x-patch 65.7 KB
v23-0002-Add-new-GUC-option-enable_parallel_dml-boolean-a.patch application/x-patch 19.3 KB
v23-0003-Parallel-SELECT-for-INSERT-INTO-.-SELECT-.-advan.patch application/x-patch 45.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-03-06 12:41:07 Re: [HACKERS] logical decoding of two-phase transactions
Previous Message Kohei KaiGai 2021-03-06 09:50:13 Re: How to retain lesser paths at add_path()?