From: | Japin Li <japinli(at)hotmail(dot)com> |
---|---|
To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
Cc: | David Steele <david(at)pgmasters(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: EXPLAIN/EXPLAIN ANALYZE REFRESH MATERIALIZED VIEW |
Date: | 2021-03-05 04:01:51 |
Message-ID: | MEYP282MB1669D626C58111E457A029FBB6969@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 04 Mar 2021 at 14:53, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-03-05 04:02:09 | Re: 011_crash_recovery.pl intermittently fails |
Previous Message | kuroda.hayato@fujitsu.com | 2021-03-05 03:57:56 | RE: [PATCH] pgbench: improve \sleep meta command |