Re: Incremental View Maintenance, take 2 (design considerations) - Mailing list pgsql-hackers

From Yugo Nagata
Subject Re: Incremental View Maintenance, take 2 (design considerations)
Date
Msg-id 20260802133923.a4492a2ee7cb73b10589497b@sraoss.co.jp
Whole thread
List pgsql-hackers
On Fri, 3 Jul 2026 19:11:16 +0900
Yugo Nagata <nagata@sraoss.co.jp> wrote:

> On Wed, 1 Jul 2026 00:04:01 +0900
> Yugo Nagata <nagata@sraoss.co.jp> wrote:
> 
> > On Fri, 29 May 2026 23:14:17 +0900
> > Yugo Nagata <nagata@sraoss.co.jp> wrote:
> >  
> > > There are still various design trade-offs to consider, so comments and discussion
> > > on the overall direction would be greatly appreciated.
> > 
> > While I'm still working on those design changes and scope reduction,
> > I've attached an updated patch to fix the broken test in the previous
> > patch set.
> > 
> > I'll send another patch set reflecting those changes once it's ready.
> 
> I've attached a reduced patch set excluding DISTINCT and aggregate support to
> reduce the review scope. I'm still working on the planned design changes, and
> I'll send another patch set reflecting those changes once they're ready.

I've attached updated patches. In the current version, a new boolean reloption
"incremental_view_maintenance" is introduced, and an Incrementally Maintainable
Materialized View (IMMV) is defined using the following syntax:

 CREATE MATERIALIZED VIEW viewname WITH (incremental_view_maintenance) AS ...

Compared to the previous "CREATE INCREMENTAL MATERIALIZED VIEW", this syntax makes it
clearer that incremental view maintenance is a property of a materialized view. It also
avoids adding a new field to pg_class or introducing new syntax keyword (INCREMENTAL).

Currently, the new option can only be specified for materialized views and cannot
be changed after creation. The documentation update is not included yet.

I'm still working on the remaining design changes, and I'll send another patch
set reflecting those changes once they're ready.

Regards,
Yugo Nagata

-- 
Yugo Nagata <nagata@sraoss.co.jp>

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: session variables again
Next
From: Alexander Melnikov
Date:
Subject: Re: Key joins