Re: mat views stats

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Jim Mlodgenski <jimmy76(at)gmail(dot)com>, PgHacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: mat views stats
Date: 2017-02-22 05:43:16
Message-ID: c82f2712-0686-c10d-f09e-d287e5ca74f9@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kuntal Ghosh 2017-02-22 05:53:07 Performance degradation in TPC-H Q18
Previous Message Amit Langote 2017-02-22 05:41:31 Re: dropping partitioned tables without CASCADE