Re: Memory Alignment in Postgres

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Arthur Silva <arthurprs(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Memory Alignment in Postgres
Date: 2014-09-11 13:51:53
Message-ID: CA+TgmobD+qTEvQuc1=-aUh6w_B0cqY_POAMXm6D8_d0vBNQVzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 11, 2014 at 9:32 AM, Arthur Silva <arthurprs(at)gmail(dot)com> wrote:
> I thought all memory alignment was (or at least the bulk of it) handled
> using some codebase wide macros/settings, otherwise how could different
> parts of the code inter-op? Poking this area might suffice for some initial
> testing to check if it's worth any more attention.

Well, sure, but the issues aren't too simple. For example, I think
there are cases where we rely on the alignment bytes being zero to
distinguish between an aligned value following and an unaligned
toasted value. That stuff can make your head explode, or at least
mine.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mitsumasa KONDO 2014-09-11 13:56:00 Re: add modulo (%) operator to pgbench
Previous Message Robert Haas 2014-09-11 13:48:10 Re: Scaling shared buffer eviction