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

Re: [GENERAL] Memory Errors...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ian Harding" <ianh(at)tpchd(dot)org>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Memory Errors...
Date: 2002-09-19 16:18:56
Message-ID: 26631.1032452336@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
"Ian Harding" <ianh(at)tpchd(dot)org> writes:
> It is pltcl [not plpgsql]

Ah.  I don't think we've done much of any work on plugging leaks in
pltcl :-(.

> It hurts when I do this:

> drop function memleak();
> create function memleak() returns int as '
> for {set counter 1} {$counter < 100000} {incr counter} {
>         set sql "select ''foo''"
>         spi_exec "$sql"
> }
> ' language 'pltcl';
> select memleak();

Yeah, I see very quick memory exhaustion also :-(.  Looks like the
spi_exec call is the culprit, but I'm not sure exactly why ...
anyone have time to look at this?

			regards, tom lane

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2002-09-19 16:22:25
Subject: Re: Proposal for resolving casting issues
Previous:From: Tom LaneDate: 2002-09-19 16:07:54
Subject: Re: killing process question

pgsql-patches by date

Next:From: Bruce MomjianDate: 2002-09-19 16:51:12
Subject: Re: to_char() code cleanup
Previous:From: Karel ZakDate: 2002-09-19 09:14:58
Subject: to_char(FM9.9) bug fix

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