function caching problem - Mailing list pgsql-hackers

From uwcssa
Subject function caching problem
Date
Msg-id f2f562510601170822q138b3f15o5497bc14c332ed23@mail.gmail.com
Whole thread Raw
List pgsql-hackers
I modified postgresql 8.1 for its optimization part. Basically I reset
the whole memory context
after query optimization (but store the query plan in top level memory
context so it is not lost).

Later at certain time, I match queries to the pre-computed query plans
(to avoid re-compiling the whole query again).  My problem is that
when optimizing
the queries, the functions (date conversion, say)  is cached into
memory (current memory context). However, this cached information is
not part of the query plan generated, so when I reset memory after
query optimization, this information is gone.  As a result, I get
"cache lookup failed for function ..."  error from inside
fmgr_info_cxt_security( ) in fmgr.c

If I wish that heap memory is never released, or i wish the heap is
never used for caching function definitions, how should I do that?  or
is there any alternatives?

thanks a lot!


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [pgsql-www] source documentation tool doxygen
Next
From: Jaime Casanova
Date:
Subject: Re: Error working with Temporary Sequences in plpgsql in 8.1 (8.0 works fine)