Simon Riggs <[EMAIL PROTECTED]> writes: > On Mon, 2008-06-23 at 15:52 -0400, Tom Lane wrote: >> Cutting a third off the size of a system index has got to be worth >> something, but is it worth a hack as ugly as this one?
> Not doing it would be more ugly, unless there is some negative > side-effect? I thought some more about why this seems ugly to me, and realized that a lot of it has to do with the change in typalign. Currently, a compiler is entitled to assume that a pointer to Name is 4-byte aligned; thus for instance it could generate word-wide instructions for copying a Name from one place to another. A "Name" that is stored as just CSTRING might break that. We are already at risk of this, really, because of all the places where we gaily pass plain old C strings to syscache and index searches on Name columns. I think the only reason we've not been burnt is that it's hard to optimize strcmp() into word-wide operations. However the solution to that seems fairly obvious: let's downgrade Name to typalign 1 instead of 4. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers