> Thanks for taking a look at the patch.
>
> The intention of the patch is to just enable the parallel mode while planning
> the select part of the materialized view, but the insertions do happen in
> the leader backend itself. That way even if there's temporary tablespace
> gets created, we have no problem.
>
> This patch can be thought as a precursor to parallelizing inserts in refresh
> matview. I'm thinking to follow the design of parallel inserts in ctas [1]
> i.e. pushing the dest receiver down to the workers once that gets reviewed
> and finalized. At that time, we should take care of not pushing inserts
> down to workers if temporary tablespace gets created.
>
> In summary, as far as this patch is considered we don't have any problem
> with temporary tablespace getting created with CONCURRENTLY option.
>
> I'm planning to add a few test cases to cover this patch in matview.sql
> and post a v2 patch soon.
Thanks for your explanation!
You are right that temporary tablespace does not affect current patch.
For the testcase:
I noticed that you have post a mail about add explain support for REFRESH MATERIALIZED VIEW.
Do you think we can combine these two features in one thread ?
Personally, The testcase with explain info will be better.
Best regards,
houzj