Re: PROPOSAL: tracking aggregated numbers from pg_stat_database

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tomas Vondra <tv(at)fuzzy(dot)cz>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PROPOSAL: tracking aggregated numbers from pg_stat_database
Date: 2013-04-15 03:20:18
Message-ID: CA+TgmoYyuwaLh=SH5gWeZuJ_3Wqf9hOjexaxPwPMQ1ys6G_-CA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 13, 2013 at 9:01 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On Sat, 2013-04-06 at 21:51 +0200, Tomas Vondra wrote:
>> This more or less works in stable environments, but once you start
>> dropping databases (think of hosting with shared DB server) it gets
>> unusable because after DROP DATABASE the database suddenly disappears
>> from the sum.
>>
>> Therefore I do propose tracking the aggregated stats, similar to the
>> pg_stat_bgwriter view.
>
> It seems like this will open a can of worms. Maybe someone wants
> aggregated stats for pg_stat_user_tables? Or maybe instead of the sum,
> someone wants to track the average? etc. I don't think we should turn
> the statistics collector into a poor man's data warehouse or statistics
> engine. Couldn't you transfer the data to some other system for
> long-term analysis? Maybe you could even use event triggers to have
> DROP DATABASE do that automatically.

I think Tomas's point about objects getting dropped is a pretty fair
one, although I agree there are potential cans of worms here.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-04-15 03:24:20 Re: add sha256 files to releases
Previous Message Peter Eisentraut 2013-04-15 02:57:27 add sha256 files to releases