Peter Eisentraut <peter.eisentr...@2ndquadrant.com> writes: > So, we're down to crashes in gin_metapage_info() on ia64 and sparc64. > My guess is that the raw page data that is passed into the function > needs to be 8-byte aligned before being accessed as GinMetaPageData.
That's what it looks like to me, too. The "bytea" page image is guaranteed to be improperly aligned for 64-bit access, since it will have an int32 length word before the actual page data, breaking the alignment that would exist for a page sitting in a page buffer. This is likely to be a problem for more things than just gin_metapage_info(); sooner or later it could affect just about everything in pageinspect. > (Maybe GinPageGetMeta() should do it?) I think the right thing is likely to be to copy the presented bytea into a palloc'd (and therefore properly aligned) buffer. And not just in this one function. regards, tom lane -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers