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

From Kevin Grittner
Subject Re: Materialized views WIP patch
Date
Msg-id 1361316771.19892.YahooMailNeo@web162905.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: Materialized views WIP patch  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Materialized views WIP patch
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> wrote:

>> That I could probably do.  Do you think they should have a separate
>> pg_stat_user_matviews table, etc., or do you think it would be
>> better to include them in with tables there?
>
> Well, ideally pg_matviews would have matview definitions, and
> pg_stat_matviews would have stats on matview usage and rows.  But see
> what you can get done; I imagine we'll overhaul it for 9.4 anyway once
> we've had a chance to use the feature.

I agree on pg_matviews, but after looking over the existing views
and thinking about what I would use them for as a DBA, I'm inclined
to fold the backing tables for MVs into the _stat_ and _statio_
views -- especially since we already include the backing tables and
indexes for TOAST.  There is a precident for including
implementation details at that level.  The only difference from
TOAST, is that I include the heap and indexes for MVs in the _user_
views.  I'm attaching the patch for just the system_views.sql file
for discussion before I go write docs for this part.

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: posix_fadvise missing in the walsender
Next
From: Kevin Grittner
Date:
Subject: Re: Materialized views WIP patch