Re: Proposal: PageLayout footprint

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: PageLayout footprint
Date: 2008-08-11 12:41:22
Message-ID: 48A03372.8090706@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas napsal(a):
> Zdenek Kotala wrote:
>> By my opinion -fipa-struct-reorg GCC option could break structure.
>
> That option would probably break a lot of things. Like our
> "variable-sized array as last field of a struct" hacks.

Yes, it is extreme case.

>> And maybe there are more compiler magic switches and optimization on
>> different platforms which can modify structure alignment or member
>> order. It probably does not happen often but footprint should protect
>> people to shot himself.
>
> We depend on a certain member order and alignment rules. If we're
> worried about that, we should add checks in configure instead, to barf
> if you try to use such options.
>

You are able to check order, but you cannot complain about structure member
alignment during configure time. But if you have two binaries which you get from
two sources then you need to verify that both binaries has same structure footprint.

Similar is 32/64 bit compilation. It is handled on x86 by MAXALIGN but MAXALIGN
is same on SPARC for both binaries, but I'm not sure if it works correctly.

Any other usage is to protect developers to make a mistake and break silently
compatibility, but it should be caught by --footprint switch.

Zdenek

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2008-08-11 12:43:54 Skimming icc warnings on mongoose
Previous Message Andrew Dunstan 2008-08-11 12:27:39 Re: proposal: UTF8 to_ascii function