Re: Parallel INSERT (INTO ... SELECT ...)

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Parallel INSERT (INTO ... SELECT ...)
Дата
Msg-id CAA4eK1JPXXC8MjBAwn-cDOVMHOoXPu3L3Q5GnMsdMwzpf2z3WA@mail.gmail.com
обсуждение исходный текст
Ответ на RE: Parallel INSERT (INTO ... SELECT ...)  ("Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>)
Ответы RE: Parallel INSERT (INTO ... SELECT ...)  ("Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>)
Список pgsql-hackers
On Wed, Dec 23, 2020 at 7:15 AM Hou, Zhijie <houzj.fnst@cn.fujitsu.com> wrote:
>
> Hi
>
> I have an issue about the parallel-safety checks.
>
> If target table is foreign table or temporary table,
> rel_max_parallel_hazard_for_modify will return PROPARALLEL_UNSAFE,
> which not only disable parallel insert but also disable underlying parallel SELECT.
>
> +create temporary table temp_names (like names);
> +explain (costs off) insert into temp_names select * from names;
> +       QUERY PLAN
> +-------------------------
> + Insert on temp_names
> +   ->  Seq Scan on names
> +(2 rows)
>
> I may be wrong, and if I miss sth in previous mails, please give me some hints.
> IMO, serial insertion with underlying parallel SELECT can be considered for foreign table or temporary table,
> as the insertions only happened in the leader process.
>

I don't think we support parallel scan for temporary tables. Can you
please try once both of these operations without Insert being
involved? If you are able to produce a parallel plan without Insert
then we can see why it is not supported with Insert.

-- 
With Regards,
Amit Kapila.



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

Предыдущее
От: "Hou, Zhijie"
Дата:
Сообщение: RE: Parallel INSERT (INTO ... SELECT ...)
Следующее
От: Li Japin
Дата:
Сообщение: Re: Confused about stream replication protocol documentation