Re: Configurable Additional Stats

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

Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> One way to accomplish the original goal by using the stats
> aggregation/reporting infrastructure directly would be to add a stats_domain
> guc which stats messages get tagged with. So you could have each application
> domain set the guc to a different value and have the stats collector keep
> table stats separately for each stats_domain/table pair.

> That could be interesting for other purposes such as marking a single
> transaction with a new stats_domain so you can look at the stats for
> just that transaction.

Hmm. That has some possibilities. You'd want a way to get the stats
collector to discard a domain when you didn't want those numbers
anymore, but that seems doable enough. Also, most likely you'd want
the collector to keep both "global" and per-domain counters, else
resetting a domain loses state --- which'd be bad from autovac's
point of view, if nothing else.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2007-06-30 02:28:15 Re: Bgwriter LRU cleaning: we've been going at this all wrong
Previous Message Dave Page 2007-06-29 20:05:25 Re: Configurable Additional Stats