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