From: | Zhihong Yu <zyu(at)yugabyte(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>, Amit Kapila <amit(dot)kapila16(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, 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-02-12 03:35:18 |
Message-ID: | CALNJ-vSJZ3eWevbxw_jiOdz67mJX2eESxCQh25mhJp458y9Eyg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
For v17-0001-Enable-parallel-SELECT-for-INSERT-INTO-.-SELECT.patch :
+ /* Assume original queries have hasModifyingCTE set correctly */
+ if (parsetree->hasModifyingCTE)
+ hasModifyingCTE = true;
Since hasModifyingCTE is false by the time the above is run, it can be
simplified as:
hasModifyingCTE = parsetree->hasModifyingCTE
+ if (!hasSubQuery)
+ return false;
+
+ return true;
The above can be simplified as:
return hasSubQuery;
Cheers
On Thu, Feb 11, 2021 at 7:02 PM Greg Nancarrow <gregn4422(at)gmail(dot)com> wrote:
> On Thu, Feb 11, 2021 at 11:17 PM Greg Nancarrow <gregn4422(at)gmail(dot)com>
> wrote:
> >
> > Posting an updated set of patches. Changes are based on feedback, as
> > detailed below:
> >
>
> Oops, looks like I forgot "COSTS OFF" on some added EXPLAINs in the
> tests, and it caused some test failures in the PostgreSQL Patch Tester
> (cfbot).
> Also, I think that perhaps the localized temporary fix included in the
> patch for the hasModifyingCTE bug should be restricted to INSERT, even
> though the bug actually exists for SELECT too.
> Posting an updated set of patches to address these.
>
> Regards,
> Greg Nancarrow
> Fujitsu Australia
>
From | Date | Subject | |
---|---|---|---|
Next Message | vignesh C | 2021-02-12 03:41:49 | Re: Libpq support to connect to standby server as priority |
Previous Message | Greg Nancarrow | 2021-02-12 03:02:22 | Re: Parallel INSERT (INTO ... SELECT ...) |