PL/pgSQL caught exceptions leak memory?

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема PL/pgSQL caught exceptions leak memory?
Дата
Msg-id 20060222035958.GA97707@winnie.fuhr.org
обсуждение исходный текст
Ответы Re: PL/pgSQL caught exceptions leak memory?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Caught exceptions in PL/pgSQL appear to leak memory -- is that
expected?  Here's a contrived test case:

CREATE FUNCTION foo(n integer) RETURNS void AS $$
BEGIN   FOR i IN 1 .. n LOOP       BEGIN           RAISE EXCEPTION 'test';       EXCEPTION         WHEN OTHERS THEN
     NULL;       END;   END LOOP;
 
END;
$$ LANGUAGE plpgsql VOLATILE STRICT;

SELECT foo(200000);

If you watch the backend with top you should see the process size
grow by around 500-600 (512?) bytes per exception caught (you might
need to use more iterations on a fast system to see the effect).

-- 
Michael Fuhr


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: initdb -U wrongness
Следующее
От: "Mark Woodward"
Дата:
Сообщение: Re: pg_config, pg_service.conf, postgresql.conf ....