Should get_rel_data_width take alignment into account?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Should get_rel_data_width take alignment into account?
Дата
Msg-id 20181211070828.mwzrswj5nepikuhk@alap3.anarazel.de
обсуждение исходный текст
Список pgsql-hackers
Hi,

I'm working on the pluggable storage patch and zheap at the moment. The
latter the latter has no alignment padding for byval attributes - since
we copy them anyway - and I was looking which places need to be adjusted
for that.  That lead me to notice that get_rel_data_width() currently
doesn't take alignment padding into account, even for byval or
fixed-width datatypes.  In a lot of cases that's probably a wash, but
it's easy enough to come up with cases where a substantial portion of
a row is padding,

It's probably not trivial to do better for all cases, but it woudln't be
too hard to estimate padding between some types of columns (say fixed
width and byval columns).

I'm not planning to work on this anytime soon, but it seems like this is
worth fixing at some point.

Greetings,

Andres Freund


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

Предыдущее
От: Ibrar Ahmed
Дата:
Сообщение: Re: Interesting paper: Contention-Aware Lock Scheduling
Следующее
От: Andrey Borodin
Дата:
Сообщение: Re: Connections hang indefinitely while taking a gin index's LWLockbuffer_content lock