Re: Fixed length data types issue - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fixed length data types issue
Date
Msg-id 21898.1157742354@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fixed length data types issue  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Fixed length data types issue  (Bruce Momjian <bruce@momjian.us>)
Re: Fixed length data types issue  (Gregory Stark <stark@enterprisedb.com>)
Re: Fixed length data types issue  (Mark Dilger <pgsql@markdilger.com>)
Re: Fixed length data types issue  (Markus Schaber <schabi@logix-tt.com>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> No one has mentioned that we page value on disk to match the CPU
> alignment.  This is done for efficiency, but is not strictly required.

Well, it is unless you are willing to give up support of non-Intel CPUs;
most other popular chips are strict about alignment, and will fail an
attempt to do a nonaligned fetch.

The only way we could pack stuff without alignment is to go over to the
idea that memory and disk representations are different --- where in
this case the "conversion" might just be a memcpy to a known-aligned
location.  The performance costs of that seem pretty daunting, however,
especially when you reflect that simply stepping over a varlena field
would require memcpy'ing its length word to someplace.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Fixed length data types issue
Next
From: Andrew Dunstan
Date:
Subject: Re: Fixed length data types issue