Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] regressin failure on latest CVS

From: "Rocco Altier" <RoccoA(at)Routescape(dot)com>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Michael Glaesemann" <grzm(at)myrealbox(dot)com>,<pgsql-patches(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org>,<ohp(at)pyrenet(dot)fr>
Subject: Re: [HACKERS] regressin failure on latest CVS
Date: 2005-07-23 15:15:44
Message-ID: 6E0907A94904D94B99D7F387E08C4F5730ECA5@FALCON.INSIGHT (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
This still does not fix the problem.

I had done my patch to try to mimic the way 8.0 had handled the math
with the remainders, but to carry it over another bucket (day).

The problem that I see is that we are taking day_remainder and
multiplying by USECS_PER_DAY.  Which is a double * int64, thus there is
the precision loss there.

I think initial division by the factor can't be helped, but repeatedly
doing more floating point math on with it is causing the rounding error.

Thanks,
	-rocco

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us] 
> Sent: Saturday, July 23, 2005 10:54 AM
> To: Rocco Altier
> Cc: Michael Glaesemann; pgsql-patches(at)postgresql(dot)org; 
> pgsql-hackers(at)postgresql(dot)org; ohp(at)pyrenet(dot)fr
> Subject: Re: [HACKERS] regressin failure on latest CVS
> 
> 
> Rocco Altier wrote:
> > This patch fixes the interval regression on my AIX box 
> (kookaburra) by
> > only doing integer math on the interval, instead of 
> float/double math.
> > 
> > I think this is the correct way to handle this, since it's 
> an integer
> > data type.
> > 
> > I don't know if it will fix Olivier's problem, since I 
> wasn't able to
> > reproduce it.
> > 
> 
> I have changed the way I compute the remainder values --- instead of
> using multiplication, I use division and then subtraction.  
> This should
> fix your rounding problem.  Looking at your fix, I don't see 
> how adding
> USECS changes things because the factor is already a float, 
> but I think
> the problem was more the way I was computing the remainders.
> 
> Patch attached --- let me know if it does not fix your problem.
> 
> --------------------------------------------------------------
 

Responses

pgsql-hackers by date

Next:From: ohpDate: 2005-07-23 15:32:58
Subject: Re: [HACKERS] regressin failure on latest CVS
Previous:From: Bruce MomjianDate: 2005-07-23 14:54:22
Subject: Re: [COMMITTERS] pgsql: In the stats test, delay for the stats collector

pgsql-patches by date

Next:From: ohpDate: 2005-07-23 15:32:58
Subject: Re: [HACKERS] regressin failure on latest CVS
Previous:From: Bruce MomjianDate: 2005-07-23 14:53:43
Subject: Re: [HACKERS] regressin failure on latest CVS

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group