RE: Consider Parallelism While Planning For REFRESH MATERIALIZED VIEW - Mailing list pgsql-hackers

From Hou, Zhijie
Subject RE: Consider Parallelism While Planning For REFRESH MATERIALIZED VIEW
Date
Msg-id 29b4a356e73241ca9ae67a851cf442bc@G08CNEXMBPEKD05.g08.fujitsu.local
Whole thread Raw
In response to Re: Consider Parallelism While Planning For REFRESH MATERIALIZED VIEW  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Consider Parallelism While Planning For REFRESH MATERIALIZED VIEW
List pgsql-hackers
> 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



pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Parallel bitmap index scan
Next
From: Amit Kapila
Date:
Subject: Re: [Patch] Optimize dropping of relation buffers using dlist