Re: Patch for fixing a few memory leaks

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Teodor Sigaev <teodor(at)stack(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch for fixing a few memory leaks
Date: 2001-10-04 22:36:26
Message-ID: Pine.LNX.4.30.0110042246070.877-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane writes:

> Applied, thanks. (Looks like the leaks were introduced fairly
> recently by the dynamic-search-path feature.)

Is there some sort of a system behind which places are subject to leaks
and which places are just too lazy to call pfree()?

I know that index support procedures must not leak, hmm, I guess this
would include the function manager...

(If that was not the right explanation, stop reading here.)

Why aren't index support procedures called with an appropriate memory
context set up? Since the functions currently do all the cleaning
themselves, couldn't it work like this:

1. set up memory context
2. call index procedure
3. clean out memory context

(This could even be slightly more efficient.)

Then again, I'm probably oversimplifying things...

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-10-04 22:50:34 Re: Patch for fixing a few memory leaks
Previous Message Tom Lane 2001-10-04 22:27:53 Re: Plpython bug with int8 - Found, need advice