Re: AIX support - alignment issues

From: Andres Freund <andres(at)anarazel(dot)de>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: AIX support - alignment issues
Date: 2022-07-05 06:31:15
Message-ID: 20220705063115.4xcm55w3o4zgrijm@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-07-05 08:13:21 +0200, Peter Eisentraut wrote:
> On 05.07.22 07:31, Andres Freund wrote:
> > On 2022-07-02 11:33:54 -0700, Andres Freund wrote:
> > > If we decide we want to continue supporting AIX we should bite the bullet and
> > > add a 64bit-int TYPALIGN_*. It might be worth to translate that to bytes when
> > > building tupledescs, so we don't need more branches (reducing them compared to
> > > today).
> >
> > I just thought an easier way - why don't we introduce a 'catalog_double'
> > that's defined to be pg_attribute_aligned(whatever-we-need) on AIX? Then we
> > can get rid of the manually enforced alignedness and we don't need to contort
> > catalog order.
>
> Isn't the problem that on AIX, double and int64 have different alignment
> requirements, and we just check the one for double and apply it to int64?
> That ought to be fixable by two separate alignment checks in configure and a
> new alignment letter for pg_type.

Except that that's quite a bit of work to get right, particularly without
regressing the performance on all platforms. The attalign switches during
tuple deforming are already quite hot.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2022-07-05 06:42:09 Re: Schema variables - new implementation for Postgres 15
Previous Message Andres Freund 2022-07-05 06:30:14 Re: AIX support - alignment issues