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

Karel Zak <zakkr@zf.jcu.cz>

From: Karel Zak - Zakkr <zakkr@zf.jcu.cz>
To: Hiroshi Inoue <Inoue@tpf.co.jp>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers <pgsql-hackers@postgreSQL.org>
Date: 2000-02-23T18:48:25Z
Lists: pgsql-hackers
On Thu, 24 Feb 2000, Hiroshi Inoue wrote:

> > 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.
> >
> 
> I proposed the implementation of copyObject() which keeps the
> references among objects once before. It seems unnatural to me
> that such kind of implementation would never be allowed by this
> restriction. 
>
> Why is memory context per plan bad ?

 One context is more simple. 

 We talking about a *cache*. If exist interface for this cache and
 all operations are with copy/freeObject it not has restriction. 
 
 For how action it will restriction? 

 The PlanCacheMemoryContext will store space only, it isn't space for 
 any action.


						Karel Z.