Re: COPY (query) TO ... doesn't allow parallelism

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: COPY (query) TO ... doesn't allow parallelism
Date: 2017-06-01 15:53:04
Message-ID: CAA4eK1+WtGqQV+N-aWwWuhr3RObns9rb+Vgn4_1_nSrKGV55Ag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 1, 2017 at 4:49 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> Hi,
>
> At the moment $subject doesn't allow parallelism, because copy.c's
> pg_plan_query() invocation doesn't set the CURSOR_OPT_PARALLEL_OK
> flag.
>
> To me that appears to be an oversight rather than intentional.
>

I also don't see any problem in parallelizing it. On a related note,
I think it might be better to have an IsInParallelMode() check in this
case as we have at other places. This is to ensure that if this
command is invoked via plpgsql function and that function runs is the
parallel mode, it will act as a safeguard.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-06-01 16:04:28 Re: COPY (query) TO ... doesn't allow parallelism
Previous Message Stephen Frost 2017-06-01 15:50:42 Re: [HACKERS] Channel binding support for SCRAM-SHA-256