function caching problem

From: uwcssa <uwcssa(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: function caching problem
Date: 2006-01-17 16:22:36
Message-ID: f2f562510601170822q138b3f15o5497bc14c332ed23@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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!

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2006-01-17 18:28:03 Re: Error working with Temporary Sequences in plpgsql in 8.1 (8.0 works fine)
Previous Message Tom Lane 2006-01-17 15:18:23 Re: [HACKERS] source documentation tool doxygen