Re: PostgreSQL for VAX on NetBSD/OpenBSD

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, John Klos <john(at)ziaspace(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
Subject: Re: PostgreSQL for VAX on NetBSD/OpenBSD
Date: 2015-08-24 22:27:15
Message-ID: 26123.1440455235@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <stark(at)mit(dot)edu> writes:
> Attached is the pg_regress diff. I believe they are all user-visible
> effects of non-iee fp math though I would have expected the rounding
> to work right and I'm not clear how gist ends up returning rows in a
> different order.

I concur that these are generally unsurprising given what we know about
VAX arithmetic. The tests that give different integer rounding results
are specifically checking whether the platform does round-to-nearest-even
as specified by IEEE. It's not surprising that pre-IEEE platforms might
not have chosen that behavior. The other stuff is due to different
range and precision of FP math, get_floatX_infinity() returning HUGE_VAL
rather than a true infinity, get_floatX_nan() throwing a SIGFPE, etc.

The gist tests in question appear to me to be underdetermined by design
--- for example, the first one is

select p from gist_tbl where p <@ box(point(0,0), point(0.5, 0.5))
order by p <-> point(0.2, 0.2);

and so there is nothing wrong with ordering (0.15,0.15) and (0.25,0.25)
differently, because they're exactly the same distance from (0.2,0.2).
I'm not sure why we've not seen more platform-specific failures on that
test. Given that it's only existed since Nov 2014, maybe we shouldn't
assume that it's been through the wars yet. I'm tempted to change the
reference point to (0.201,0.201) or so, so that the correct sort order
is unambiguous. Heikki, did you make it like that intentionally?

We could eliminate the unexpected FPEs on use of "NaN" if we configured
get_floatX_nan() to throw a "platform does not support NaN" error rather
than intentionally executing an undefined operation. However, I'm not
sure why we'd bother unless we're going to make VAX a supported platform,
and personally I don't want to change the other tests that are failing
here.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kouhei Kaigai 2015-08-25 00:49:12 Re: [DESIGN] ParallelAppend
Previous Message Pavel Stehule 2015-08-24 20:04:25 Re: psql - better support pipe line