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

Re: [HACKERS] regressin failure on latest CVS

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rocco Altier <RoccoA(at)Routescape(dot)com>
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 14:53:43
Message-ID: 200507231453.j6NErhj09458@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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.

---------------------------------------------------------------------------


> Thanks,
> 	-rocco
> 
> > -----Original Message-----
> > From: pgsql-hackers-owner(at)postgresql(dot)org 
> > [mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Bruce Momjian
> > Sent: Friday, July 22, 2005 10:41 AM
> > To: Michael Glaesemann
> > Cc: ohp(at)pyrenet(dot)fr; pgsql-hackers(at)postgresql(dot)org
> > Subject: Re: [HACKERS] regressin failure on latest CVS
> > 
> > 
> > Michael Glaesemann wrote:
> > > 
> > > On Jul 22, 2005, at 6:28 PM, ohp(at)pyrenet(dot)fr wrote:
> > > 
> > > > I tried the latest cvs this morning (07/22 11:00 CET)
> > > > and interval test fails.
> > > > Here's the regression.diffs.
> > > 
> > > >
> > > > *** ./expected/interval.out    Fri Jul 22 10:32:21 2005
> > > > --- ./results/interval.out    Fri Jul 22 11:07:54 2005
> > > > ***************
> > > > *** 217,224 ****
> > > >   -- updating pg_aggregate.agginitval
> > > >   select avg(f1) from interval_tbl;
> > > >                          avg
> > > > ! -------------------------------------------------
> > > > !  @ 4 years 1 mon 10 days 4 hours 18 mins 23 secs
> > > >   (1 row)
> > > >
> > > >   -- test long interval input
> > > > --- 217,224 ----
> > > >   -- updating pg_aggregate.agginitval
> > > >   select avg(f1) from interval_tbl;
> > > >                         avg
> > > > ! ------------------------------------------------
> > > > !  @ 4 years 1 mon 9 days 4 hours 18 mins 23 secs
> > > >   (1 row)
> > > >
> > > >   -- test long interval input
> > > 
> > > Could you provide platform information? Did you build with 
> > --enable- 
> > > integer-datetimes? Looking at the buildfarm, kookaburra 
> > (AIX 5.2) is  
> > > also failing the interval test at the same point, but the 
> > result is  
> > > different.
> > 
> > Interesting.  I don't see the error with our without
> > --enable-integer-datetimes.  I even tried changing my 
> > timezone to Paris
> > time and still could not reproduce the failure.
> > 
> > On the AIX problem below, we are going to get rounding issues.
> > 
> > --------------------------------------------------------------
> > -------------
> > 
> > 
> > > http://pgbuildfarm.org/cgi-bin/show_history.pl?nm=kookaburra&br=HEAD
> > > 
> > > ================== pgsql.36852/src/test/regress/regression.diffs  
> > > ===================
> > > *** ./expected/interval.out     Fri Jul 22 01:25:05 2005
> > > --- ./results/interval.out      Fri Jul 22 01:34:20 2005
> > > ***************
> > > *** 217,224 ****
> > >    -- updating pg_aggregate.agginitval
> > >    select avg(f1) from interval_tbl;
> > >                           avg
> > > ! -------------------------------------------------
> > > !  @ 4 years 1 mon 10 days 4 hours 18 mins 23 secs
> > >    (1 row)
> > > 
> > >    -- test long interval input
> > > --- 217,224 ----
> > >    -- updating pg_aggregate.agginitval
> > >    select avg(f1) from interval_tbl;
> > >                            avg
> > > ! ----------------------------------------------------
> > > !  @ 4 years 1 mon 10 days 4 hours 18 mins 22.99 secs
> > >    (1 row)
> > > 
> > > 
> > > Michael Glaesemann
> > > grzm myrealbox com
> > > 
> > > 
> > > 
> > > ---------------------------(end of 
> > broadcast)---------------------------
> > > TIP 1: if posting/reading through Usenet, please send an appropriate
> > >        subscribe-nomail command to majordomo(at)postgresql(dot)org 
> > so that your
> > >        message can get through to the mailing list cleanly
> > > 
> > 
> > -- 
> >   Bruce Momjian                        |  http://candle.pha.pa.us
> >   pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
> >   +  If your life is a hard drive,     |  13 Roberts Road
> >   +  Christ can be your backup.        |  Newtown Square, 
> > Pennsylvania 19073
> > 
> > ---------------------------(end of 
> > broadcast)---------------------------
> > TIP 4: Have you searched our list archives?
> > 
>                http://archives.postgresql.org

Content-Description: timestamp.patch

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2005-07-23 14:54:22
Subject: Re: [COMMITTERS] pgsql: In the stats test, delay for the stats collector
Previous:From: Michael FuhrDate: 2005-07-23 14:52:06
Subject: Re: pgsql: In the stats test, delay for the stats collector to catch up

pgsql-patches by date

Next:From: Rocco AltierDate: 2005-07-23 15:15:44
Subject: Re: [HACKERS] regressin failure on latest CVS
Previous:From: Bruce MomjianDate: 2005-07-23 14:25:42
Subject: Re: [HACKERS] Timezone bugs

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