Re: TupleDesc refcounting

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: TupleDesc refcounting
Дата
Msg-id 1137481212.9145.102.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: TupleDesc refcounting  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: TupleDesc refcounting
Список pgsql-patches
On Sun, 2006-01-15 at 12:08 -0500, Tom Lane wrote:
> My inclination at this point is to forget the whole thing and just patch
> the callers of lookup_rowtype_tupdesc that need to copy the tupdesc.

Actually, I think I finally understand how to implement this patch
sanely. I had thought that the lifetime of a TupleDesc should be
dictated by either the memory context in which it is allocated, OR its
reference count. This leads us down the road toward mandatory reference
counting, which I agree is a net loss. However, since we're primarily
concerned with TupleDescs allocated in CacheMemoryContext and that
context is never reset, we can use the reference count *just* to manage
the "external" references to TupleDescs. That should make the patch far
less invasive. (I have the feeling you've been suggesting this all
along, I've just been too thick-skulled to understand you.)

I'll hopefully have a patch implementing this finished by tomorrow
evening.

-Neil



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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: patch to create system view that lists cursors
Следующее
От: Tom Lane
Дата:
Сообщение: Re: TupleDesc refcounting