Re: Database file compatability
От
Jim C. Nasby
Тема
Re: Database file compatability
Дата
Msg-id
20050930231435.GO40138@pervasive.com
Ответ на
Re: Database file compatability (Tom Lane)
Список
Дерево обсуждения
Re: Database file compatability "Qingqing Zhou" <zhouqq@cs.toronto.edu>
On Wed, Sep 28, 2005 at 10:22:51AM -0400, Tom Lane wrote: > "Qingqing Zhou" writes: > > "Tom Lane" wrote in message > > There is a possible sequence like this: > > > ALIGNOF_LONG 4 > > ALIGNOF_DOUBLE 8 > > MAXIMUM_ALIGNOF 8 > > > vs. > > > ALIGNOF_LONG 8 > > ALIGNOF_DOUBLE 8 > > MAXIMUM_ALIGNOF 8 > > > So we should at least check ALIGNOF_LONG as well. > > No, we don't need to, because we do not really care about ALIGNOF_LONG > per se. We don't use "long" as an on-disk datatype, precisely because > we don't know what size it is. We use int32 and int64. The former has > align 4 on all machines AFAIK, and the latter has MAXIMUM_ALIGNOF. Is there a serious penalty associated with just checking them all? Seems like better safe than sorry... On a related note, are checks for endianness made as well? -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
В списке pgsql-hackers по дате отправления