Skip site navigation (1) Skip section navigation (2)

Re: polymorphic arguments and return type for PL/pgSQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: polymorphic arguments and return type for PL/pgSQL
Date: 2003-06-30 23:54:27
Message-ID: 20626.1057017267@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Joe Conway <mail(at)joeconway(dot)com> writes:
> With the current linked list, the function is effectively leaked to the 
> end of the session anyway, so I don't think this is any worse. Thoughts?

Don't worry about it now.  If a plpgsql function cache entry is
discarded, we leak far more than just the function struct :-( ... and
most of it has been malloc'd, not palloc'd, so it's very hard to get
back.

Someday plpgsql should be rewritten so that it never malloc's anything,
and all its parse data structures are palloc'd into a memory context
associated with the current function cache entry.  Then it would be
practical to recover the memory associated with an obsoleted cache
entry.  But we've lived without this so far, so I guess it's not causing
many people problems.

			regards, tom lane

In response to

pgsql-patches by date

Next:From: Peter EisentrautDate: 2003-07-01 00:08:27
Subject: Re: Datetime patch
Previous:From: Joe ConwayDate: 2003-06-30 23:32:46
Subject: Re: [HACKERS] Missing array support

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group