Did this add to the "ways in which [HeapTupleData] is used"?

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Did this add to the "ways in which [HeapTupleData] is used"?
Дата
Msg-id 618AECCC.4000806@anastigmatix.net
обсуждение исходный текст
Список pgsql-hackers
Hi,

I notice, belatedly, that 141fd1b tweaked the order of some members of
struct catctup, moving c_list and my_cache from earlier locations to the
end of the struct. [0]

That resulted in this sequence at the end of the struct:

...
    HeapTupleData tuple;        /* tuple management header */
    struct catclist *c_list;    /* containing CatCList, or NULL if none */
    CatCache   *my_cache;       /* link to owning catcache */
    /* properly aligned tuple data follows, unless a negative entry */
}


It works, of course, with tuple->t_data pointed appropriately to the aligned
spot after the struct. But does this add a new variant to the possible
situations described in the htup.h comments?

  * * Part of a palloc'd tuple: the HeapTupleData itself and the tuple
  *   form a single palloc'd chunk.  t_data points to the memory location
  *   immediately following the HeapTupleData struct (at offset
HEAPTUPLESIZE). ...
  *
  * * Separately allocated tuple: t_data points to a palloc'd chunk that
  *   is not adjacent to the HeapTupleData.  (This case is deprecated since
  *   it's difficult to tell apart from case #1. ...


Am I right in thinking that created a new case where the HeapTupleData
and the tuple are not adjacent, but also not separately allocated?
Would that perhaps warrant a mention in those comments in htup.h?

Regards,
-Chap


[0]

https://github.com/postgres/postgres/commit/141fd1b#diff-0f0061d745a9e6bcdf8b59ba304d4bae77c59ce400fb5ffd062cc36be077e8e7L116



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Commitfest 2021-11 Patch Triage - Part 2
Следующее
От: Tom Lane
Дата:
Сообщение: Frontend error logging style