Re: Plan for compressed varlena headers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Plan for compressed varlena headers
Дата
Msg-id 4631.1171483253@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Plan for compressed varlena headers  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Plan for compressed varlena headers
Список pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> Gregory Stark wrote:
>> If we want to allow storing >1 headers unaligned which I think would be
>> good then I still think we have to read them using bytewise lookups -- ie
>> by casting to (char*). That means network byte order or using the low order
>> bits is equally efficient.

> I think the plan was to have the macro code conditional on big-little
> endian.  We can deal with doing >1 headers unaligned at some future
> date if we feel we need it, and the macros will make it transparent.

Forcing bytewise access does not sound like a good plan to me --- you're
very much at the mercy of the compiler whether you get good code for
that.  Plus you can't do it without multiple evaluation of the macro
argument, which is something I'd really prefer we not introduce into
such a widely-used macro.  The only argument in favor is to save a
couple bytes of alignment padding, but since this is only going to
happen for wide data values, the significance of that is minimal.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: "anyelement2" pseudotype
Следующее
От: Alex Hayward
Дата:
Сообщение: Re: Reducing likelihood of deadlocks (was referential Integrity and SHARE locks)