Re: Configurable Additional Stats - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Configurable Additional Stats
Date
Msg-id 19849.1183395341@sss.pgh.pa.us
Whole thread Raw
In response to Re: Configurable Additional Stats  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> 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.

Right, and I don't see any reasonable way for a plug-in to establish
such an infrastructure --- how's it going to cause the postmaster to
shepherd a second stats collector process, for instance?

The proposal seems to be in the very early handwaving stage, because
issues like this obviously haven't been thought about.  I would suggest
building a working prototype plugin, and then you'll really know what
hooks you need.  (Comparison point: we'd never have invented the correct
hooks for the index advisor if we'd tried to define them in advance of
having rough working code to look at.)

> 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.

+1.  I'm also thinking that hooks inside the stats collector process
itself might be needed, though I have no idea exactly what.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: what is difference between LOCAL and GLOBAL TEMP TABLES in PostgreSQL
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Postgresql.conf cleanup