Re: Life cycles of tuple descriptors

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Re: Life cycles of tuple descriptors
Дата
Msg-id 61BA782B.3070304@anastigmatix.net
обсуждение исходный текст
Ответ на Re: Life cycles of tuple descriptors  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 12/15/21 17:50, Tom Lane wrote:

> Here's a draft patch for this.  There are several places that are
> directly using DecrTupleDescRefCount after lookup_rowtype_tupdesc
> or equivalent, which'd now be forbidden.  I think they are all safe
> given the assumption that the typcache's tupdescs for named composites
> are refcounted.  (The calls in expandedrecord.c could be working
> with RECORD, but those code paths just checked that the tupdesc
> is refcounted.)  So there's no actual bug here, and no reason to
> back-patch, but this seems like a good idea to decouple callers
> a bit more from typcache's internal logic.

I agree with the analysis at each of those sites, and the new comment
clears up everything that had puzzled me before.

Regards,
-Chap



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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Life cycles of tuple descriptors
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Life cycles of tuple descriptors