Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements - Mailing list pgsql-committers

From Petr Jelinek
Subject Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements
Date
Msg-id 5515E2A6.8010904@2ndquadrant.com
Whole thread Raw
In response to Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-committers
On 27/03/15 23:26, Andrew Dunstan wrote:
>
> On 03/27/2015 05:53 PM, Tom Lane wrote:
>> Andrew Dunstan <andrew@dunslane.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


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Add stats for min, max, mean, stddev times to pg_stat_statements