| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
| Cc: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, Dan Gorman <dgorman(at)hi5(dot)com>, mischa(at)ca(dot)sophos(dot)com, pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: Selects query stats? |
| Date: | 2006-05-23 19:55:50 |
| Message-ID: | 19283.1148414150@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> OTOH ISTM it would be easy to modify Postgres so as to count statements
> in the stat collector, by turning pgstat_report_activity into a routine
> that sent a count (presumably always 1) instead of the query string, and
> then just add the count to a counter on receiving.
You wouldn't have to change the backends at all, just modify the
collector to count the number of report_activity messages received.
Might have to play some games with ignoring "<IDLE>" messages, but
otherwise simple (and simplistic...)
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim C. Nasby | 2006-05-23 20:02:48 | Re: Selects query stats? |
| Previous Message | Alvaro Herrera | 2006-05-23 19:50:01 | Re: Selects query stats? |