Re: Postgres storing time in strange manner

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Casey Allen Shobe <cshobe(at)secureworks(dot)net>
Cc: pgsql-bugs(at)postgreSQL(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Postgres storing time in strange manner
Date: 2002-09-15 18:14:59
Message-ID: 4669.1032113699@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-novice

>> The kernel version is probably not relevant here; what's more
>> interesting is the compiler version, compiler optimization level,
>> and perhaps libc version.

> cshobe(at)gabrielle:/www/htdocs$ gcc -v
> Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs
> gcc version 2.95.3 20010315 (release)
> cshobe(at)gabrielle:/www/htdocs$ echo $CFLAGS
> -O3 -march=i686 -mcpu=i686 -funroll-loops -ffast-math

Bingo: it's the -ffast-math option that's causing the problem.
See, eg,
http://fts.postgresql.org/db/mw/msg.html?mid=1277557

If you rebuild without that, I think you'll find the problem goes away.

ISTM that at one time we had considered actively discriminating against
-ffast-math in CFLAGS in configure ... but I don't see any sign in
current sources that we make any attempt to remove -ffast-math from
environment-supplied CFLAGS. Peter, do you think that would be a
reasonable thing to do?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Casey Allen Shobe 2002-09-15 18:27:03 Re: Postgres storing time in strange manner
Previous Message Randy Pearson 2002-09-15 16:42:27 Re: Memory leak in client application

Browse pgsql-novice by date

  From Date Subject
Next Message Casey Allen Shobe 2002-09-15 18:27:03 Re: Postgres storing time in strange manner
Previous Message Tom Lane 2002-09-15 15:49:32 Re: Postgres storing time in strange manner