Re: [HACKERS] Cache query (PREPARE/EXECUTE)

Поиск
Список
Период
Сортировка
От Karel Zak - Zakkr
Тема Re: [HACKERS] Cache query (PREPARE/EXECUTE)
Дата
Msg-id Pine.LNX.3.96.1000223180302.15013F-100000@ara.zf.jcu.cz
обсуждение исходный текст
Ответ на Re: [HACKERS] Cache query (PREPARE/EXECUTE)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, 23 Feb 2000, Tom Lane wrote:

> "Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> > I think so.  The problem is that Node struct couldn't be freed safely
> > due to the lack of reference count in its definition.  As far as I see
> > plans could be destroyed only when the memory context in which
> > they are placed are destroyed.
> 
> This is overly conservative.  It should be safe to destroy a plan tree
> via freeObject() if it was created via copyObject() --- and that is
> certainly how the plan would get into a permanent memory context.

Yes, SPI and my PREPARE use copyObject() for saving to TopMemoryContext.

Well, I believe you Tom that freeObject() is correct and I start 
implement PlanCacheMemoryContext's routines for PREPARE (and
SPI's saveplan ?). 
                    Karel Z.



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Beta for 4:30AST ... ?
Следующее
От: "Hiroshi Inoue"
Дата:
Сообщение: RE: [HACKERS] Cache query (PREPARE/EXECUTE)