Re: Why the data changes it's value by itself! - Mailing list pgsql-general

From Richard Huxton
Subject Re: Why the data changes it's value by itself!
Date
Msg-id 455D927C.2070701@archonet.com
Whole thread Raw
In response to Re: Why the data changes it's value by itself!  ("Ardian Xharra" <axharra@boxxo.info>)
List pgsql-general
Ardian Xharra wrote:
> For the column: date(varchar 8) '2000606' the
> SELECT ascii(substring(date,4,1)) from jnlsale WHERE id_jnlsale=28384
> gives: 22
> SELECT ascii('6'); gives 54

Hmm - a difference of 32, or a single bit (2^5).

> For the column: amount(float 8)  1.20932764209866e-307 the
> SELECT ascii(substring(amount,20,1)) from jnlsale WHERE id_jnlsale=28382
> gives: 48

Sorry - this only applies to the text. I'd need to figure out the
internal format of the float8 and see what happened.

Well, if all the textual differences are single-bit (1,2,4,8,16,32...)
I'd suspect hardware. I can't imagine the kind of bug in PostgreSQL that
would cause that kind of error.

I can imagine a faulty RAM chip or slowly failing hard-disk causing that
kind of error though. I'd find a Linux live CD that supports memtest86
(or one of its spin-offs) and leave it testing your RAM for 24 hours or so.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: dependency on 32 bit libpq.so on 64 bit Postgres server.
Next
From: Marcin Mańk
Date:
Subject: Re: statement_timeout