Re: Materialized views WIP patch - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Materialized views WIP patch
Date
Msg-id CA+TgmoYXSEEpfUMKytf1a_AJyN1jPD3ZFfZ+faXYn+PwOtw1=g@mail.gmail.com
Whole thread Raw
In response to Re: Materialized views WIP patch  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Materialized views WIP patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Materialized views WIP patch  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On Tue, Feb 19, 2013 at 11:01 AM, Peter Eisentraut <peter_e@gmx.net> wrote:
> On 2/19/13 8:54 AM, Robert Haas wrote:
>> In the department of crazy ideas, what about having pg_dump NEVER
>> refresh ANY materialized views?
>
> It might be useful to have an option for this, but I don't think it
> should be the default.  The default should be that the new database is
> "ready to go".
>
> Then again, when would you ever actually use that option?

You'd use that option if you'd rather get the database mostly-up as
soon as possible, and then worry about the materialized views
afterwards.

> 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.

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



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: PostgreSql - access modified rows in prepare transaction command
Next
From: "pierpaolo.cincilla"
Date:
Subject: Re: PostgreSql - access modified rows in prepare transaction command