On Thu, 04 Mar 2021 at 14:53, Bharath Rupireddy <bharath.rupireddyforpostg...@gmail.com> wrote: > Thanks! I will look forward for more review comments. >
v4-0001-Rearrange-Refresh-Mat-View-Code.patch --------------------------------------------- +static Oid +get_new_heap_oid(RefreshMatViewStmt *stmt, Relation matviewRel, Oid matviewOid, + char *relpersistence) +{ + Oid OIDNewHeap; + bool concurrent; + Oid tableSpace; + + concurrent = stmt->concurrent; + + /* Concurrent refresh builds new data in temp tablespace, and does diff. */ + if (concurrent) + { + tableSpace = GetDefaultTablespace(RELPERSISTENCE_TEMP, false); + *relpersistence = RELPERSISTENCE_TEMP; + } Since the concurrent only use in one place, I think we can remove the local variable concurrent in get_new_heap_oid(). The others looks good to me. -- Regrads, Japin Li. ChengDu WenWu Information Technology Co.,Ltd.