CatCache state reversing

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема CatCache state reversing
Дата
Msg-id 20040514235342.GA27354@dcc.uchile.cl
обсуждение исходный текст
Ответы Re: CatCache state reversing
Список pgsql-hackers
Hackers,

In looking at the CatCache code it's clear to me that there's no point
in copying the whole structure like I did to the Relcache; it's much
bigger, and there's not much that can change inside a subtransaction:
CatCacheRemoveCTup can't be called, because ReleaseCatCache will not be
called more times than SearchCatCache was called.  So it can, at most,
end with the same number of references.

What I'm currently thinking is that for each entry in the cache, we'll
save the current refcount at subtransaction start, and then restore it
at subtransaction abort.  At subtransaction commit, the parent's
refcount will be updated with the subtransaction's refcount, which can
be greater than zero.

This will be done by adding an int* member to the catctup and catclist
structs, and keeping the integers there.

Comments?

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"People get annoyed when you try to debug them."  (Larry Wall)


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Feature freeze approaching
Следующее
От: Tom Lane
Дата:
Сообщение: Re: relcache refcount