Re: Materialized views WIP patch

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Marko Tiikkaja <pgmail(at)joh(dot)to>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Materialized views WIP patch
Date: 2013-02-19 13:54:34
Message-ID: CA+TgmoahDmiGRSFVbTv=_ZyMDJD4a2DeixRV-fbiAmqdfO91SA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Mon, Feb 18, 2013 at 4:48 PM, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
> This should allow me to simplify the code a little bit and move the
> RMV step to the very end. That may have some advantages when users
> want to start using the database while MVs are being populated.

In the department of crazy ideas, what about having pg_dump NEVER
refresh ANY materialized views?

It's true that the job of pg_dump and pg_restore is to put the new
database in the same state that the old database was in, but I think
you could make a reasonable case that materialized views ought to be
an exception. After all, even with all of this infrastructure,
chances are pretty good that the new MV contents won't end up being
the same as the old MV contents on the old server - because the old
MVs could easily have been stale. So why not just get the restore
over with as fast as possible, and then let the user refresh the MVs
that they think need refreshing (perhaps after getting the portions of
their system that don't rely on MVs up and running)?

At the very least, I think we ought to have an option for this
behavior. But the more I think about it, the more I think maybe it
ought to be the default.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Nicolas Barbier 2013-02-19 14:24:28 Re: Materialized views WIP patch
Previous Message Alvaro Herrera 2013-02-18 21:57:04 pgsql: Move ExceptionalCondition back to postgres.h

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-02-19 13:57:52 Re: sql_drop Event Trigger
Previous Message Robert Haas 2013-02-19 13:48:05 Re: [RFC] indirect toast tuple support