Re: Configurable Additional Stats - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Configurable Additional Stats
Date
Msg-id 87ir924v2v.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Configurable Additional Stats  ("Simon Riggs" <simon@2ndquadrant.com>)
Responses Re: Configurable Additional Stats  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Configurable Additional Stats  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-hackers
"Simon Riggs" <simon@2ndquadrant.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



pgsql-hackers by date:

Previous
From: "Jeroen T. Vermeulen"
Date:
Subject: Re: ANALYZE and index/stats degradation
Next
From: Tom Lane
Date:
Subject: Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL