Обсуждение: Re: FWD: bizarre behavior of 'time' data entry
> Postgresql subtracts one minute from any times I enter into a database: > mydb=# create table test (timeval time); > mydb=# insert into test values ('08:30'); > mydb=# select * from test; > ---------- > 08:29:00 ... > In a later message he says he's running 7.0.2 on "Trustix Secure Linux > 1.2 (RedHat based)", whatever that is. > Thomas, did you see this thread on pg-novices? You ever seen behavior > like this? I'm baffled. Not sure about the distro, but it is hard to imagine that they got it more wrong wrt compiler options than has Mandrake (the other platform with rounding trouble in their default packages). Barry, can you give more details? How have you build PostgreSQL? We'll need some help tracking this down, but afaik it will point back to a build problem on your platform. - Thomas
> ps shows postgresql running: > /usr/bin/pg_ctl -D /var/lib/pgsql/data -p /usr/bin/postmaster start > /usr/bin/postmaster -i > I can poke a hole in my firewall and let you connect to the database if you > would like troubleshoot my sytem. But I'll need some help setting up > permissions to allow external connections. Let me know and I'll send my IP > address to your private email. I won't have time to do this in the next few weeks, since I'll be traveling most of the time. You might find another volunteer from this list, but if not I would suggest the following steps: 1) send us your default rpm compiler and build options. Use rpm --showrc > tempfiletomail.txt gcc --version >>&! tempfiletomail.txt 2) try building postgresql from sources. See if the problem persists (it won't). 3) try building the postgresql rpm from sources. The steps are a) rpm -ivv postgresql-xxx.src.rpmb) cd /usr/src/RPM/SPEC (for Mandrake, RedHat uses /usr/src/RedHat...)c) rpm -ba postgresql.spec(verify the spec file name)d) cd /usr/src/RPM/RPMS/ixxxe) rpm -Uvh --force postgresql*.ixxx.rpm I'm doing these steps from memory, and you had better save your database contents somewhere just in case it gets trashed ;) > Also, let me know what particular build problems might cause this, and I'll > post to Trustix mail list. Not sure, since I've never seen this before for this data type :( - Thomas
> See attached tmpfile.txt... This distro uses the same or similar compiler flags as does Mandrake, *and it is the wrong thing to do*!!!! The gcc folks recommend against ever using "-O3" with "-fast-math", but both of these distros do it anyway. And you see the results :( Pick up the .rpmrc I've posted at ftp.postgresql.org for Mandrake (look somewhere under /pub/binaries/...) and put it in your root account's home directory. Then try rebuilding from your .src.rpm and see what happens... - Thomas
Check out Trustix at www.trustix.net. I'm using the RPM that was installed with the distro. ps shows postgresql running: /usr/bin/pg_ctl -D /var/lib/pgsql/data -p /usr/bin/postmaster start /usr/bin/postmaster -i I can poke a hole in my firewall and let you connect to the database if you would like troubleshoot my sytem. But I'll need some help setting up permissions to allow external connections. Let me know and I'll send my IP address to your private email. Also, let me know what particular build problems might cause this, and I'll post to Trustix mail list. Thanks for you help, Barry On 2001.01.12 12:13:57 -0500 Thomas Lockhart wrote: > > Postgresql subtracts one minute from any times I enter into a database: > > mydb=# create table test (timeval time); > > mydb=# insert into test values ('08:30'); > > mydb=# select * from test; > > ---------- > > 08:29:00 > ... > > In a later message he says he's running 7.0.2 on "Trustix Secure Linux > > 1.2 (RedHat based)", whatever that is. > > Thomas, did you see this thread on pg-novices? You ever seen behavior > > like this? I'm baffled. > > Not sure about the distro, but it is hard to imagine that they got it > more wrong wrt compiler options than has Mandrake (the other platform > with rounding trouble in their default packages). > > Barry, can you give more details? How have you build PostgreSQL? We'll > need some help tracking this down, but afaik it will point back to a > build problem on your platform. > > - Thomas >
See attached tmpfile.txt. I'm going to try rebuilding the 7.0.2 SRPM first. If that doesn't work, I'll try building the 7.0.3 tar source file. Wish me luck! Barry On 2001.01.13 10:34:55 -0500 Thomas Lockhart wrote: > > ps shows postgresql running: > > /usr/bin/pg_ctl -D /var/lib/pgsql/data -p /usr/bin/postmaster start > > /usr/bin/postmaster -i > > I can poke a hole in my firewall and let you connect to the database if > you > > would like troubleshoot my sytem. But I'll need some help setting up > > permissions to allow external connections. Let me know and I'll send > my IP > > address to your private email. > > I won't have time to do this in the next few weeks, since I'll be > traveling most of the time. You might find another volunteer from this > list, but if not I would suggest the following steps: > > 1) send us your default rpm compiler and build options. Use > > rpm --showrc > tempfiletomail.txt > gcc --version >>&! tempfiletomail.txt > > 2) try building postgresql from sources. See if the problem persists (it > won't). > > 3) try building the postgresql rpm from sources. The steps are > > a) rpm -ivv postgresql-xxx.src.rpm > b) cd /usr/src/RPM/SPEC (for Mandrake, RedHat uses /usr/src/RedHat...) > c) rpm -ba postgresql.spec (verify the spec file name) > d) cd /usr/src/RPM/RPMS/ixxx > e) rpm -Uvh --force postgresql*.ixxx.rpm > > I'm doing these steps from memory, and you had better save your database > contents somewhere just in case it gets trashed ;) > > > Also, let me know what particular build problems might cause this, and > I'll > > post to Trustix mail list. > > Not sure, since I've never seen this before for this data type :( > > - Thomas >
Вложения
FIXED! I had already started to rebuild the SRPM when your latest email arrived. After installing the resulting RPMS, the problem still existed. I downloaded the Mandrake .rpmrc file, rebuilt, and the problem is gone (yea!). Interestingly enough, the existing time entries in my test database magically added back the missing minute. I guess the values were stored correctly in the database, but were mangled in the display somehow. Oh well, that's academic; I'm off to be a productive PostgreSQL user... Thanks for lending me your valuable time. Barry TODO: Advise Trustix developers of conflicting gcc flags. On 2001.01.13 12:17:31 -0500 Thomas Lockhart wrote: > > See attached tmpfile.txt... > > This distro uses the same or similar compiler flags as does Mandrake, > *and it is the wrong thing to do*!!!! The gcc folks recommend against > ever using "-O3" with "-fast-math", but both of these distros do it > anyway. > > And you see the results :( > > Pick up the .rpmrc I've posted at ftp.postgresql.org for Mandrake (look > somewhere under /pub/binaries/...) and put it in your root account's > home directory. Then try rebuilding from your .src.rpm and see what > happens... > > - Thomas >