Use of SizeOfIptrData - is that obsolete?

Поиск
Список
Период
Сортировка
От Pavan Deolasee
Тема Use of SizeOfIptrData - is that obsolete?
Дата
Msg-id CABOikdOOawDda4hwLOT6zdA6MFfPLu3Z2YBZkX0JdayNS6JOeQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Use of SizeOfIptrData - is that obsolete?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

I happened to notice this comment in src/include/storage/itemptr.h

 * Note: because there is an item pointer in each tuple header and index
 * tuple header on disk, it's very important not to waste space with
 * structure padding bytes.  The struct is designed to be six bytes long
 * (it contains three int16 fields) but a few compilers will pad it to
 * eight bytes unless coerced.  We apply appropriate persuasion where
 * possible, and to cope with unpersuadable compilers, we try to use
 * "SizeOfIptrData" rather than "sizeof(ItemPointerData)" when computing
 * on-disk sizes.
 */

Is that now obsolete? I mean I can still find one reference in src/backend/executor/nodeTidscan.c, which uses SizeOfIptrData instead of sizeof (ItemPointerData), but all other places such as heapam_xlog.h now use sizeof operator. It was changed in 2c03216d831160b when we moved a bunch of xlog related stuff from htup.h to this new file. Hard to tell if there were other users before that and they were all dropped in this one commit or various commits leading to this.

Thanks,
Pavan

--
 Pavan Deolasee                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pageinspect: Hash index support
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: IF (NOT) EXISTS in psql-completion