pgsql: Improve shm_mq portability around MAXIMUM_ALIGNOF and sizeof(Siz

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve shm_mq portability around MAXIMUM_ALIGNOF and sizeof(Siz
Date: 2014-03-18 15:26:11
Message-ID: E1WPvu7-0004lq-Vl@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve shm_mq portability around MAXIMUM_ALIGNOF and sizeof(Size).

Revise the original decision to expose a uint64-based interface and
use Size everywhere possible. Avoid assuming that MAXIMUM_ALIGNOF is
8, or making any assumption about the relationship between that value
and sizeof(Size). If MAXIMUM_ALIGNOF is bigger, we'll now insert
padding after the length word; if it's smaller, we are now prepared
to read and write the length word in chunks.

Per discussion with Tom Lane.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3bd261ca18c67eafe18088e58fab511e3b965418

Modified Files
--------------
src/backend/storage/ipc/shm_mq.c | 251 +++++++++++++++++++++++---------------
src/include/storage/shm_mq.h | 4 +-
2 files changed, 154 insertions(+), 101 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-03-18 15:37:06 pgsql: Fix relcache reference leak in refresh_by_match_merge().
Previous Message Tom Lane 2014-03-18 14:38:59 pgsql: Fix pg_dumpall option parsing: -i doesn't take an argument.