public inbox for [email protected]
help / color / mirror / Atom feedFrom: [email protected] <[email protected]>
To: 'Zhihong Yu' <[email protected]>
To: Yugo NAGATA <[email protected]>
Cc: vignesh C <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Andrew Dunstan <[email protected]>
Cc: Andy Fan <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Tatsuo Ishii <[email protected]>
Cc: Thomas Munro <[email protected]>
Subject: RE: Implementing Incremental View Maintenance
Date: Mon, 6 Sep 2021 10:06:37 +0000
Message-ID: <OS0PR01MB56829A65926C0FF7CF00F5EB82D29@OS0PR01MB5682.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CALNJ-vRSVtqZDXU6-DjdycFkjonxKs2TbBFb=W=W9Y7KG0rRwA@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<[email protected]>
<CAKU4AWoxXkPPL2qMoAn-2skEbt+9E2MrARhcf+NKwm4JFg-uHg@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CALDaNm2UoQ64B-GW0q4U_5RURddKSmsJMjDv2f-uM6c4+QakSw@mail.gmail.com>
<[email protected]>
<[email protected]>
<CALNJ-vTaGk4AvjrCPPkW_GyWQ+KeW_dFA=hakcxfy=rGF28TWQ@mail.gmail.com>
<CALNJ-vRSVtqZDXU6-DjdycFkjonxKs2TbBFb=W=W9Y7KG0rRwA@mail.gmail.com>
Hi Nagata-san,
I'm still reading the patch.
I have additional comments.
(1)
In v23-0001-Add-a-syntax-to-create-Incrementally-Maintainabl.patch, ivm member is added to IntoClause struct.
I think it is necessary to modify _copyIntoClause() and _equalIntoClause() functions.
(2)
By executing pg_dump with v23-0005-Add-Incremental-View-Maintenance-support-to-pg_d.patch,
the constraint which is automatically created during "CREATE INCREMENTAL MATERIALIZED VIEW" is also dumped.
This cause error during recovery as follows.
ivm=# create table t (c1 int, c2 int);
CREATE TABLE
ivm=# create incremental materialized view ivm_t as select distinct c1 from t;
NOTICE: created index "ivm_t_index" on materialized view "ivm_t"
SELECT 0
Then I executed pg_dump.
In the dump, the following SQLs appear.
CREATE INCREMENTAL MATERIALIZED VIEW public.ivm_t AS
SELECT DISTINCT t.c1
FROM public.t
WITH NO DATA;
ALTER TABLE ONLY public.ivm_t
ADD CONSTRAINT ivm_t_index UNIQUE (c1);
If I execute psql with the result of pg_dump, following error occurs.
ERROR: ALTER action ADD CONSTRAINT cannot be performed on relation "ivm_t"
DETAIL: This operation is not supported for materialized views.
Regards,
Ryohei Takahashi
view thread (215+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: RE: Implementing Incremental View Maintenance
In-Reply-To: <OS0PR01MB56829A65926C0FF7CF00F5EB82D29@OS0PR01MB5682.jpnprd01.prod.outlook.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox