> -----Original Message-----
> From: Tom Lane
>
> Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu> writes:
> > now I will get 's' as expected... Dumping the database out and
> bringing it
> > back the problem doesn't appear anymore... for a while... I cannot give
> > an exact report, but usually this bug occurs when I stop the database
> > and I start it again.
>
> Hmm. Is it possible that when you restart the postmaster, you are
> accidentally starting it with a different environment --- in particular,
> different LOCALE or LC_xxx settings --- than it had before?
>
> If there is an index on id_string then
> > select * from foo where id_string = 'something';
> would try to use the index, and so could get messed up by a change
> in LOCALE; the index would now appear to be out of order according to
> the new LOCALE value.
>
There could be another cause.
If a B-tree page A was splitted to the page A(changed) and a page B but
the transaction was rolled back,the pages A,B would not be written to
disc and the followings could occur for example.
1) The changed non-leaf page of A and B may be written to disc later.
2) An index entry may be inserted into the page B and committed later.
I don't know how often those could occur.
Regards.
Hiroshi Inoue