Re: plpython memory leak uppon empty resultsets in all versions - Mailing list pgsql-bugs

From Andres Freund
Subject Re: plpython memory leak uppon empty resultsets in all versions
Date
Msg-id 201004302357.04885.andres@anarazel.de
Whole thread Raw
In response to Re: plpython memory leak uppon empty resultsets in all versions  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
On Friday 30 April 2010 23:54:16 Andres Freund wrote:
> On Friday 30 April 2010 20:09:48 Tom Lane wrote:
> > Andres Freund <andres@anarazel.de> writes:
> > > On Friday 30 April 2010 19:39:32 Tom Lane wrote:
> > >> Yeah.  There's a leak of the tuptable in the CATCH path, too.  Will
> > >> fix.
> > >
> > > Yes, theres even more than that (measured it) in the error case. Will
> > > have a look later today.
> >
> > Here's the patch I'm planning to apply --- working it back into the
> > back branches now.
>
> The one I measured was 9.0 only:

> Found by running something like:
>
> while true; do echo 'DO LANGUAGE plpythonu $$import
> gc;gc.collect();plpy.execute("SELECT unknown"); $$;';done|psql -h /tmp -p
> 5433 postgres

Actually this one is also visible by 'SELECT 1' which is kinda obivous with
the above diff I guess - but I wanted to mention it for completeness.

Andres

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: plpython memory leak uppon empty resultsets in all versions
Next
From: Jasen Betts
Date:
Subject: Re: Bug with Tsearch and tsvector