Re: pgbench progress report improvements - split 3 v2 - A - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: pgbench progress report improvements - split 3 v2 - A
Date
Msg-id alpine.DEB.2.02.1310081408500.28568@sto
Whole thread Raw
In response to Re: pgbench progress report improvements - split 3 v2 - A  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
> On Sat, Oct 5, 2013 at 6:10 PM, Noah Misch <noah@leadboat.com> wrote:
>> The sum of the squares of the latencies wraps after 2^63/(10^12 * avg_latency
>> * nclients) seconds.  That's unlikely to come up with the ordinary pgbench
>> script, but one can reach it in a few hours when benchmarking a command that
>> runs for many seconds.  If we care, we can track the figure as a double.  I
>> merely added a comment about it.
>
> Using a double seems wise to me.

I think that both int64 & double are fine.

The likelyhood of having underflows (double) or overflows/wraparounds 
(int64) seems pretty low for any practical run. I took the former because 
it is exact... up to when it is totally wrong. The later one may provide 
underestimated results silently: it would fail more continuously.

So I'm okay if it is changed to double consistently.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Atri Sharma
Date:
Subject: Re: Re: custom hash-based COUNT(DISTINCT) aggregate - unexpectedly high memory consumption
Next
From: Andrew Dunstan
Date:
Subject: Re: Patch: FORCE_NULL option for copy COPY in CSV mode