Re: BUG #4677: memory growth

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4677: memory growth
Дата
Msg-id 6168.1235681416@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4677: memory growth  ("aiwaniuk" <aiwaniuk@instytut.com.pl>)
Ответы Re: BUG #4677: memory growth
Re: BUG #4677: memory growth
Список pgsql-bugs
"aiwaniuk" <aiwaniuk@instytut.com.pl> writes:
> 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

The reason there's an issue here is that you're invoking the same
function f() both inside and outside the subtransactions caused by
the begin/exception block.  The expressions inside f() get re-prepared
each time the subtransaction ID changes.  The memory this eats is
reclaimed at subtransaction end.  So the memory used by the call inside
the begin/exception block is cleaned up immediately, but the memory
used by the other call accumulates in the outer subtransaction's
workspace.

We'll think about how to fix this, but you shouldn't expect that a
fix will appear quickly.  A possible workaround is to put another
begin/exception block around the other call of the function.

            regards, tom lane

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

Предыдущее
От: "aiwaniuk"
Дата:
Сообщение: BUG #4677: memory growth
Следующее
От: Manuel G Vazquez B/Mexico/IBM
Дата:
Сообщение: Support platform of PostgresSQL 8.1.9 under IBM AIX 5.3