Re: mat views stats

Jim Nasby <jim.nasby@bluetreble.com>

From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Jim Mlodgenski <jimmy76@gmail.com>, PgHacker <pgsql-hackers@postgresql.org>
Date: 2017-02-22T05:43:16Z
Lists: pgsql-hackers
On 2/21/17 4:22 PM, Peter Eisentraut wrote:
>> Attached is a patch to trigger autovacuum based on a matview refresh
>> along with a system view pg_stat_all_matviews to show information more
>> meaningful for materialized views.
> It might be easier to include materialized views into pg_stat_*_tables.

Certainly easier, but I don't think it'd be better. Matviews really 
aren't the same thing as tables. Off-hand (without reviewing the patch), 
update and delete counts certainly wouldn't make any sense. "Insert" 
counts might, in as much as it's how many rows have been added by 
refreshes. You'd want a refresh count too.

> I think these should be two separate patches.  We might want to
> backpatch the first one.

+1; definitely sounds like a bug to me.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)


Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix REFRESH MATERIALIZED VIEW to report activity to the stats collector.