BUG #4677: memory growth

From: "aiwaniuk" <aiwaniuk(at)instytut(dot)com(dot)pl>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4677: memory growth
Date: 2009-02-26 15:15:54
Message-ID: 200902261515.n1QFFspG020306@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 4677
Logged by: aiwaniuk
Email address: aiwaniuk(at)instytut(dot)com(dot)pl
PostgreSQL version: >8.0
Operating system: linux
Description: memory growth
Details:

i postgres version 8.2, 8.3 and probobly 8.1 there is problem with running
VOLATILE plpgsql function with begin - exception checking that performs
other VOLATILE plpgsql function. if either, first or second performing
removed, problem doesn't shows. here's an example

CREATE FUNCTION info.f()
RETURNS void AS
$BODY$
DECLARE
tmp text;
BEGIN
-- do anything
tmp = md5(random()::text) || md5(random()::text);
RETURN;
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;

CREATE or replace FUNCTION info.memory_growth(i_max integer)
RETURNS integer AS
$BODY$
DECLARE
i integer;
BEGIN
i = 0;
WHILE i < i_max LOOP

BEGIN
PERFORM info.f();
EXCEPTION
WHEN OTHERS THEN
--
END;

PERFORM info.f();

i = i + 1;
END LOOP;

RETURN i;
END;$BODY$
LANGUAGE 'plpgsql' VOLATILE;

after running
select info.memory_growth(100000);

please take a look how's memory of client process grows. is there some
logical problem how functions are create ?

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Manuel G Vazquez B/Mexico/IBM 2009-02-26 19:58:56 Support platform of PostgresSQL 8.1.9 under IBM AIX 5.3
Previous Message 田中 裕一 2009-02-26 04:25:21 Re: BUG #4674: Unable to open lob