Re: GSoC - proposal - Materialized Views in PostgreSQL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: GSoC - proposal - Materialized Views in PostgreSQL
Date
Msg-id 9244.1271188857@sss.pgh.pa.us
Whole thread Raw
In response to Re: GSoC - proposal - Materialized Views in PostgreSQL  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
> There are basically 2 major parts for materialized views:

> A) Planner: Getting the query planner to swap in the MatView for part of
> a query automatically for query plan portions which the MatView supports;

> B) Maintenance: maintaining the MatView data according to the programmed
> scheme (synch, asynch, periodic).

> I do not believe it is possible to do both of the above in one summer.
> Of the two, (A) would be more useful since it is possible to manually
> implement (B) using triggers, queues and cron jobs today.

A patch that implements only (A) will be DOA.  The reason is that the
planner can *never* "swap in a MatView" on its own authority, unless it
can prove that this does not change the semantics of the query.  Which
it obviously will be unable to do unless there's a fully transparent
continuous-update scheme in place.

So the correct approach is to work on (B) first.  When and if we get to
a sufficiently transparent update implementation, we can think about
changing the planner.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: a faster compression algorithm for pg_dump
Next
From: Alvaro Herrera
Date:
Subject: Re: How to generate specific WAL records?