Re: Better Connection Statistics

From: rob stone <floriparob(at)gmail(dot)com>
To: Shaun Thomas <sthomas(at)optionshouse(dot)com>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Better Connection Statistics
Date: 2014-02-07 18:02:27
Message-ID: 1391796147.5492.0.camel@roblaptop.virtua.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

O
n Fri, 2014-02-07 at 15:00 +0000, Shaun Thomas wrote:S
o, I haven't ever heard of this, but I could be missing something. Is
there a module or extension for PostgreSQL keep connection statistics? I
don't mean what's in pg_stat_activity, but cumulative. And not like
what's in pg_stat_statements, but about the connections themselves. Nor
even pg_stat_database, since that's only granular at the database level.
>
> For instance, I want the number of transactions a specific connection has submitted. The number of queries. Total amount of CPU time consumed, etc. So far as I know, there is no module, statistic, or view that provides any of this. It occurred to me after one of our NOC guys asked us if a certain machine was spamming us with queries, and I realized I didn't know, and had no way of finding out. The best I can do is see if any are currently, this very second, executing something. If the connection happens to be between transactions when I poll pg_stat_statements, I get nothing.
>
> I know pg_pool and pg_bouncer provide info like this, but we don't use those. Is there anything internal to PG that can... eventually get it?
>
> --
> Shaun Thomas
> OptionsHouse | 141 W. Jackson Blvd | Suite 500 | Chicago IL, 60604
> 312-676-8870
> sthomas(at)optionshouse(dot)com
>
> ______________________________________________
>
> See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email
>
>

Perhaps this might be of use.

http://www.postgresql.org/docs/current/static/pgstatstatements.html

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shaun Thomas 2014-02-07 18:08:51 Re: Better Connection Statistics
Previous Message Robin Coe 2014-02-07 17:58:05 Re: Full Text Index Scanning

Browse pgsql-novice by date

  From Date Subject
Next Message Shaun Thomas 2014-02-07 18:08:51 Re: Better Connection Statistics
Previous Message Shaun Thomas 2014-02-07 15:00:38 Better Connection Statistics