Re: Explain [Analyze] produces parallel scan for select Into table statements.

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Explain [Analyze] produces parallel scan for select Into table statements.
Дата
Msg-id CAA4eK1JMgG_6vFLXVzVnmc0p1fb42NJU7mCzf6J-b-iXL0Uw7g@mail.gmail.com
обсуждение исходный текст
Ответ на Explain [Analyze] produces parallel scan for select Into table statements.  (Mithun Cy <mithun.cy@enterprisedb.com>)
Ответы Re: Explain [Analyze] produces parallel scan for select Into table statements.  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Wed, Mar 9, 2016 at 8:18 PM, Mithun Cy <mithun.cy@enterprisedb.com> wrote:
>
> 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 problem.


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Improving replay of XLOG_BTREE_VACUUM records
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Support for N synchronous standby servers - take 2