Re: Portability issues in shm_mq

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Portability issues in shm_mq
Date: 2014-03-18 02:49:55
Message-ID: CA+TgmoaW=RSPM-dpj_m7PtvCZiQUkkq9huvzw31MM4h061HP1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 17, 2014 at 1:26 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> Oh, yeah. Duh. Clearly my brain isn't working today. Hmm, so maybe
> this will be fairly simple... will try it out.

OK, I tried this out. The major complication that cropped up was
that, if we make the length word always a Size but align the buffer to
MAXIMUM_ALIGNOF, then the length word might get split if sizeof(Size)
> MAXIMUM_ALIGNOF. That doesn't look too bad, but required changing a
couple of if statements into while loops, and changing around the
structure of a shm_mq_handle a bit. See attached.

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

Attachment Content-Type Size
shm-mq-size.patch text/x-patch 17.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Johnston 2014-03-18 02:52:26 Re: Minimum supported version of Python?
Previous Message Joshua D. Drake 2014-03-18 02:47:30 Re: Minimum supported version of Python?