Re: Configurable Additional Stats

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Dave Page" <dpage(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Configurable Additional Stats
Date: 2007-07-02 16:41:12
Message-ID: 87ir924v2v.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:

> 2) Charge-back accounting. Keep track by userid, user group, time of
> access etc of all accesses to the system, so we can provide chargeback
> facilities to users. You can put your charging rules into the plugin and
> have it spit out appropriate chargeback log records, when/if required.
> e.g. log a chargeback record every time a transaction touches > 100
> blocks, to keep track of heavy queries but ignore OLTP workloads.

Sure, but I think Tom's question is how do you get from the plugin to wherever
you want this data to be? There's not much you can do with the data at that
point. You would end up having to reconstruct the entire stats collector
infrastructure to ship the data you want out via some communication channel
and then aggregate it somewhere else.

Perhaps your plugin entry point is most useful *alongside* my stats-domain
idea. If you wanted to you could write a plugin which set the stats domain
based on whatever criteria you want whether that's time-of-day, userid, load
on the system, etc.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-07-02 16:43:21 Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL
Previous Message Jeroen T. Vermeulen 2007-07-02 16:33:08 Re: ANALYZE and index/stats degradation