Re: Materialized views WIP patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Marko Tiikkaja <pgmail(at)joh(dot)to>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Materialized views WIP patch
Date: 2013-02-20 11:43:42
Message-ID: 27998.1361360622@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Feb 19, 2013 at 11:01 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>> This might be different if there were a command to refresh all
>> materialized views, because you don't want to have to go around and type
>> separate commands 47 times after a restore.

> Well, it's pretty easy to do:

> SELECT 'LOAD MATERIALIZED VIEW ' || p.oid::regclass || ';' FROM
> pg_class WHERE relkind = 'm';

> ...but we could also add explicit syntax for it, perhaps along the
> lines of what we have for CLUSTER and VACUUM.

It's not really that easy, because of the likelihood that MVs have to be
refreshed in a specific order. The SELECT you suggest definitely seems
too simplistic. A dedicated command could perhaps be built to pay
attention to dependencies ... but if we're still coding such things now,
it seems a bit late for 9.3.

regards, tom lane

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2013-02-20 14:29:45 Re: Materialized views WIP patch
Previous Message Robert Haas 2013-02-20 11:13:49 Re: Materialized views WIP patch

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2013-02-20 11:55:03 Re: Review : Add hooks for pre- and post-processor executables for COPY and \copy
Previous Message pierpaolo.cincilla 2013-02-20 11:39:32 Re: PostgreSql - access modified rows in prepare transaction command