Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Database file compatability



On Wed, Sep 28, 2005 at 10:22:51AM -0400, Tom Lane wrote:
> "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu> writes:
> > "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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(at)pervasive(dot)com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group