Re: Portability issues in shm_mq

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Portability issues in shm_mq
Date: 2014-03-17 02:45:06
Message-ID: 10057.1395024306@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> But I think there's another possible problem here. In order for reads
> from the buffer not to suffer alignment problems, the chunk size for
> reads and writes from the buffer needs to be MAXIMUM_ALIGNOF (or some
> multiple of it). And in order to avoid a great deal of additional and
> unwarranted complexity, the size of the message word also needs to be
> MAXIMUM_ALIGNOF (or some multiple of it). So the message word can
> only be of size 4 if MAXIMUM_ALIGNOF is also 4. IOW, I think your
> approach is going to run into trouble on any system where
> sizeof(Size)==4 but MAXIMUM_ALIGNOF==8.

Well, it will result in padding space when you maxalign the length word,
but I don't see why it wouldn't work; and it would certainly be no less
efficient than what's there today.

I'll be quite happy to test the results on my old HPPA box, which has
exactly those properties, if you're worried about it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Johnston 2014-03-17 03:42:12 Re: BUG #9578: Undocumented behaviour for temp tables created inside query language (SQL) functions
Previous Message Tom Lane 2014-03-17 02:34:47 Re: Minimum supported version of Python?