Re: Portability issues in shm_mq
От | Tom Lane |
---|---|
Тема | Re: Portability issues in shm_mq |
Дата | |
Msg-id | 17076.1395112169@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Portability issues in shm_mq (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: Portability issues in shm_mq
|
Список | pgsql-hackers |
Robert Haas <robertmhaas@gmail.com> writes: > 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. Hmm ... do we support any platforms where that's actually the case? It's possible I guess but I don't know of any offhand. The reverse case is real, but I'm not sure about this one. > 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. Would it get noticeably simpler or faster if you omitted support for the sizeof(Size) > MAXIMUM_ALIGNOF case? It looks like perhaps not, but if we were paying anything much I'd be tempted to just put in a static assert to the contrary and see if anyone complains. BTW, can't we drop the MAXALIGN64 stuff again? regards, tom lane
В списке pgsql-hackers по дате отправления: