Re: Parallel INSERT (INTO ... SELECT ...) - Mailing list pgsql-hackers

From Greg Nancarrow
Subject Re: Parallel INSERT (INTO ... SELECT ...)
Date
Msg-id CAJcOf-eWffFmm7MogorctK7dZhKWi2V-3U1mb25H1gfMLVXvpQ@mail.gmail.com
Whole thread Raw
In response to Re: Parallel INSERT (INTO ... SELECT ...)  (vignesh C <vignesh21@gmail.com>)
Responses Re: Parallel INSERT (INTO ... SELECT ...)
Re: Parallel INSERT (INTO ... SELECT ...)
Re: Parallel INSERT (INTO ... SELECT ...)
Re: Parallel INSERT (INTO ... SELECT ...)
List pgsql-hackers
On Wed, Dec 9, 2020 at 1:35 AM vignesh C <vignesh21@gmail.com> wrote:
>
> Most of the code present in
> v9-0001-Enable-parallel-SELECT-for-INSERT-INTO-.-SELECT.patch is
> applicable for parallel copy patch also. The patch in this thread
> handles the check for PROPARALLEL_UNSAFE, we could slightly make it
> generic by handling like the comments below, that way this parallel
> safety checks can be used based on the value set in
> max_parallel_hazard_context. There is nothing wrong with the changes,
> I'm providing these comments so that this patch can be generalized for
> parallel checks and the same can also be used by parallel copy.

Hi Vignesh,

You are absolutely right in pointing that out, the code was taking
short-cuts knowing that for Parallel Insert,
"max_parallel_hazard_context.max_interesting" had been set to
PROPARALLEL_UNSAFE, which doesn't allow that code to be generically
re-used by other callers.

I've attached a new set of patches that includes your suggested improvements.

Regards,
Greg Nancarrow
Fujitsu Australia

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: small cleanup in unicode_norm.c
Next
From: Dilip Kumar
Date:
Subject: Re: Parallel Inserts in CREATE TABLE AS