RE: [HACKERS] Cache query (PREPARE/EXECUTE) - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject RE: [HACKERS] Cache query (PREPARE/EXECUTE)
Date
Msg-id NDBBIJLOILGIKBGDINDFEEPGCCAA.Inoue@tpf.co.jp
Whole thread Raw
In response to Re: [HACKERS] Cache query (PREPARE/EXECUTE)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses RE: [HACKERS] Cache query (PREPARE/EXECUTE)
List pgsql-hackers
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> 
> "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.
>

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 ?

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp 




pgsql-hackers by date:

Previous
From: Karel Zak - Zakkr
Date:
Subject: Re: [HACKERS] Cache query (PREPARE/EXECUTE)
Next
From: wieck@debis.com (Jan Wieck)
Date:
Subject: Re: [HACKERS] Cache query (PREPARE/EXECUTE)