On Wed, Mar 9, 2016 at 8:18 PM, Mithun Cy <mithun...@enterprisedb.com>
> Hi All,
> Explain [Analyze] Select Into table..... produces the plan which uses
parallel scans.
> Possible Fix:
> I tried to make a patch to fix this. Now in ExplainOneQuery if into
clause is
> defined then parallel plans are disabled as similar to their execution.

- /* plan the query */

- plan = pg_plan_query(query, CURSOR_OPT_PARALLEL_OK, params);

+ /*

+ * plan the query.

+ * Note: If Explain is for CreateTableAs / SelectInto Avoid parallel

+ *       plans.

+ */

+ plan = pg_plan_query(query, into ? 0:CURSOR_OPT_PARALLEL_OK, params);

There should be a white space between 0:CURSOR_OPT_PARALLEL_OK.  Also I
don't see this comment is required as similar other usage doesn't have any
such comment.  Fixed these two points in the attached patch.

In general, the patch looks good to me and solves the problem mentioned.  I
have ran the regression tests with force_parallel_mode and doesn't see any

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

Attachment: Analyze_select_into_disable_parallel_scan_v2.patch
Description: Binary data

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to