On Fri, Jan 7, 2011 at 1:29 PM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> #1. Add a new 'Top-but-removed-on-DISCARD' context and modify the PLs to
> use that instead of TopMemoryContext and require any other contexts
> they create to be children of it.
I'm guessing that just resetting the memory context is going to result
in things breaking all over the place - the PL might have dangling
pointers into the context. And it might have other resources that we
don't know about. Thus I think we need:
> #2. Add another entry point to the PLs in pg_pltemplate.h which is a
> function to be called on DISCARD.
...except I think that the principal thing you need to modify is
pl_language, rather than pl_pltemplate.
If we go this route, then (1) it can't be back-patched, obviously, and
(2) we need to think a little bit harder about what we're asking to
have discarded, because I think it's going to be a lot more than just
The Enterprise PostgreSQL Company
In response to
pgsql-hackers by date
|Next:||From: Dimitri Fontaine||Date: 2011-01-08 12:14:05|
|Subject: Re: obj_unique_identifier(oid)|
|Previous:||From: Robert Haas||Date: 2011-01-08 11:04:49|
|Subject: Re: join functions|