Re: [HACKERS] mat views stats - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: [HACKERS] mat views stats
Date
Msg-id c82f2712-0686-c10d-f09e-d287e5ca74f9@BlueTreble.com
Whole thread Raw
In response to Re: [HACKERS] mat views stats  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] mat views stats  (Jim Mlodgenski <jimmy76@gmail.com>)
Re: [HACKERS] mat views stats  (Robert Haas <robertmhaas@gmail.com>)
List 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)



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: [HACKERS] dropping partitioned tables without CASCADE
Next
From: Kuntal Ghosh
Date:
Subject: [HACKERS] Performance degradation in TPC-H Q18