RE: Consider Parallelism While Planning For REFRESH MATERIALIZED VIEW

Поиск
Список
Период
Сортировка
От Hou, Zhijie
Тема RE: Consider Parallelism While Planning For REFRESH MATERIALIZED VIEW
Дата
Msg-id b04c3807dd2e45a78f5a69d480f86e04@G08CNEXMBPEKD05.g08.fujitsu.local
обсуждение исходный текст
Ответ на Re: Consider Parallelism While Planning For REFRESH MATERIALIZED VIEW  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Consider Parallelism While Planning For REFRESH MATERIALIZED VIEW  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
Hi

> Added this to commitfest, in case it is useful -
> https://commitfest.postgresql.org/31/2856/

I have an issue about the safety of enable parallel select.

I checked the [parallel insert into select] patch.
https://commitfest.postgresql.org/31/2844/
It seems parallel select is not allowed when target table is temporary table.

+    /*
+     * We can't support table modification in parallel-mode if it's a foreign
+     * table/partition (no FDW API for supporting parallel access) or a
+     * temporary table.
+     */
+    if (rel->rd_rel->relkind == RELKIND_FOREIGN_TABLE ||
+        RelationUsesLocalBuffers(rel))
+    {
+        table_close(rel, lockmode);
+        context->max_hazard = PROPARALLEL_UNSAFE;
+        return context->max_hazard;
+    }

For Refresh MatView.
if CONCURRENTLY is specified, It will builds new data in temp tablespace:
    if (concurrent)
    {
        tableSpace = GetDefaultTablespace(RELPERSISTENCE_TEMP, false);
        relpersistence = RELPERSISTENCE_TEMP;
    }

For the above case, should we still consider parallelism ?

Best regards,
houzj




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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] [PATCH] Generic type subscripting
Следующее
От: Daniil Zakhlystov
Дата:
Сообщение: Re: libpq compression