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

Поиск
Список
Период
Сортировка
От Hou, Zhijie
Тема RE: Parallel INSERT (INTO ... SELECT ...)
Дата
Msg-id 278f4203fc6540508cc3f3465ea9ec5f@G08CNEXMBPEKD05.g08.fujitsu.local
обсуждение исходный текст
Ответ на Re: Parallel INSERT (INTO ... SELECT ...)  (Greg Nancarrow <gregn4422@gmail.com>)
Ответы Re: Parallel INSERT (INTO ... SELECT ...)  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
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.

Are there any special considerations for this case ?

Best regards,
houzj



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [Patch] Optimize dropping of relation buffers using dlist
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Parallel INSERT (INTO ... SELECT ...)