Re: SearchSysCacheTuple(Copy)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SearchSysCacheTuple(Copy)
Дата
Msg-id 1899.974187344@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SearchSysCacheTuple(Copy)  (Hiroshi Inoue <Inoue@tpf.co.jp>)
Список pgsql-hackers
Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> Isn't it practical to replace all susipicious Search
> SysCacheTuple() by SearchSysCacheTupleCopy() ?

That would replace a rare failure condition by a not-at-all-rare
memory leak.  I'm not sure there'd be a net gain in reliability :-(

A more serious objection to SearchSysCacheTupleCopy is that once the
tuple is copied out of the syscache, there isn't any mechanism to
detect whether it's still valid.  If an SI message arrives for a
recently-copied tuple, we have no way to know if we have a problem
or not.

I think that the right fix is to add reference counts to syscache
entries.  This has been on my todo list for awhile, but hasn't got
to the top yet...
        regards, tom lane


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

Предыдущее
От: Hiroshi Inoue
Дата:
Сообщение: Re: SearchSysCacheTuple(Copy)
Следующее
От: Hiroshi Inoue
Дата:
Сообщение: Re: SearchSysCacheTuple(Copy)