Re: Re: [COMMITTERS] pgsql: Fix plpgsql to release SPI plans when a function or DO block is

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Jan Urbański <wulczer(at)wulczer(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Fetter <david(at)fetter(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Fix plpgsql to release SPI plans when a function or DO block is
Date: 2011-03-28 15:25:39
Message-ID: 20110328152539.GR4116@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

* Jan Urbański (wulczer(at)wulczer(dot)org) wrote:
> On 28/03/11 04:31, Tom Lane wrote:
> >> Do the other PLs we ship need similar fixes?
> >
> > Offhand I think the other PLs leave management of prepared plans to the
> > user. If there are any places where they cache plans behind the scenes,
> > maybe a similar fix would be appropriate.
>
> FWIW I executed
>
> do $$ plpy.execute("select 1 from pg_class") $$ language plpythonu;
>
> 10k times in a session and the backend grew a lot in memory and never
> released it. I can't offhand see where the memory went, I'll try to
> investigate in the evening.

I'm about 90% sure that they all have this problem.. I havn't had a
chance to look at how Tom fixed pl/pgsql (I didn't think it'd be easy to
do w/o coming up with a way to explicitly tell the PL to release
something) so perhaps I'm mistaken, but they all share very similar
code..

Thanks,

Stephen

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message pgsql 2011-03-28 18:11:20 pgsql: Tag refs/tags/REL9_1_ALPHA5 was created
Previous Message Robert Haas 2011-03-28 14:02:00 pgsql: Mark up release notes using <link>.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-03-28 15:27:05 Re: Proposal: q-gram GIN and GiST indexes
Previous Message Robert Haas 2011-03-28 15:21:49 Re: Proposal: q-gram GIN and GiST indexes