Re: Portability issues in shm_mq

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Portability issues in shm_mq
Дата
Msg-id 10057.1395024306@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Portability issues in shm_mq  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Portability issues in shm_mq  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [BUGS] BUG #9223: plperlu result memory leak
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Minimum supported version of Python?