question about the _SPI_save_plan() and plan cache

From: "Tao Ma" <feng_eden(at)163(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: question about the _SPI_save_plan() and plan cache
Date: 2009-07-28 10:02:12
Message-ID: h4mib4$9i0$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

It seems postgres cache the plan under CacheMemoryContext during the
plpgsql executing.
If there is a function with lots of variables and every one of them got a
default value,
postgres will allocate lots of memory for caching the default value plan(we
have to run
the function at least once). Once we DROP the function, the memory consumed
by the plan
will be leak. The same thing for the compiled function
structure(PLpgSQL_function).

Is this an oldest known question?

Thanks,
Tao Ma

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sam Mason 2009-07-28 10:13:14 Re: SE-PostgreSQL Specifications
Previous Message Laurent Laborde 2009-07-28 09:29:54 Re: Higher TOAST compression.