Michael J Schout <mschout@mail.gkg-com.com> writes:
> The expected part shows:
> QUERY: SELECT random FROM RANDOM_TBL
> WHERE random NOT BETWEEN 80 AND 120;
> random
> ------
> (0 rows)
> and the actual results are:
> QUERY: SELECT random FROM RANDOM_TBL
> WHERE random NOT BETWEEN 80 AND 120;
> random
> ------
> 123
> (1 row)
> Which looks like a genuine bug to me :).
No, that's expected behavior, actually. The random test wouldn't be
random if it didn't fail occasionally :-). The parameters are set so
that the "expected" results are produced most of the time. If you get
a non-expected result from random more than about one time in five,
then it's worth investigating... but if you *never* got an unexpected
result, it would suggest the random function wasn't working...
> I am on a V2250 machine which is a 16 cpu PA-RISC 2.0 environment. Which is
> a pure 64 bit environment. HP-UX will no longer support 32 bit environments
> beginning with 11.01. Interestingly, this bug is not 100% repeatable.
> When I run the test, about half otf the time the bug happens. The other
> half, the test runs to completion.
Interesting. May or may not be a 64-bit issue; it might be a problem
with the machine-dependent spinlock code. Check out
src/include/storage/s_lock.h and src/backend/storage/buffer/s_lock.c.
regards, tom lane