Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements
Date: 2015-03-27 23:07:18
Message-ID: 5515E2A6.8010904@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 27/03/15 23:26, Andrew Dunstan wrote:
>
> On 03/27/2015 05:53 PM, Tom Lane wrote:
>> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>> Add stats for min, max, mean, stddev times to pg_stat_statements.
>> The buildfarm is quite unhappy with this patch. Kinda looks like
>> it was never tested on 32-bit machines.
>>
>>
>
>
> I have committed a fix which is turning the buildfarm back to green.
>
> However, it is moaning about the code in the sqrtd() function. I'm
> wondering if we shouldn't just rip that out and use the library sqrt()
> function. It's not called for every statement processed, only each time
> the function is called (for each row).
>

Or you could change the long long int to int64.

But in general I wouldn't be too much against ripping it off, it's only
a bit of CPU when reading the stats...

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-03-27 23:39:23 Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements
Previous Message Andrew Dunstan 2015-03-27 22:26:58 Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements