Qingqing Zhou <[EMAIL PROTECTED]> writes:
> This patches checks MAXIMUM_ALIGNOF and endian to make sure that the
> database file used is compatible with the server version.

I missed seeing this patch in my inbox, so wrote and applied my own
version earlier today.  Sorry for the missed communication :-(.  It's
about the same result though.

> What it comes down
> to is that MAXIMUM_ALIGNOF is sufficient to tell the difference between
> the platforms we need to deal with. Also, check the endian to make sure
> that the multibytes numbers storage is compatible.

There's not much need to check endianness explicitly, since the
pg_control_version check will surely fail if there's an endianness
discrepancy (not to mention the other checks on pg_control fields).
[ Actually, I had originally thought that alignment would be reflected
implicitly in pg_control too, but given that it's mostly int32 fields
I don't think that can be relied on. ]

What I did add, after reviewing the past discussion of these issues,
is a simple-minded test to see if the floating-point storage format
is the same.  That and endianness/alignment are the only points that
have been mentioned as likely causes of cross-platform incompatibility.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not

Reply via email to