Re: plperl doesn't release memory

Поиск
Список
Период
Сортировка
От GIROIRE Nicolas (COFRAMI)
Тема Re: plperl doesn't release memory
Дата
Msg-id 1904E3EB39448246A7ECB76DF34A70B0036A4047@TOCOMEXC03
обсуждение исходный текст
Ответ на plperl doesn't release memory  (Sven Willenberger <sven@dmv.com>)
Список pgsql-general

The function is a little big, so i put it in an enclosure file.

The function write regularly in a file to empty the variable theClob. The fact the written is done all 100000 has no signification, it's just to empty theClob before it's full.

We have a look at the memory and it never decreases.
If you have question about code, tell me ?
This code is correct because it functions over a little example.

Best regards

        COFRAMI
        Nicolas Giroire
        on behalf of AIRBUS France
        for In Flight & Ground Information Services - Development
        Phone : +33 (0)5 67 19 98 74
              Mailto:nicolas.giroire@airbus.com

-----Message d'origine-----
De : Sean Davis [mailto:sdavis2@mail.nih.gov]
Envoyé : jeudi 31 mars 2005 13:15
À : GIROIRE Nicolas (COFRAMI)
Objet : Re: [GENERAL] plperl doesn't release memory

On Mar 31, 2005, at 1:38 AM, GIROIRE Nicolas (COFRAMI) wrote:

> Hi,
> I work with William.
>
> In fact, we have already done the procedure in pl/pgsql but it is too
> slow and we use array which are native in perl.
> The procedure is recursive, and use request on postgreSQL.
> According to the evolution of memory use, it seems that no memory is
> free. I think that comes from the fact we have a recursive procedure.
>
> The execution of the procedure take 3 hours and finishes already by an
> out of memory.
>
> Can we oblige pl/perl to free memory for variable ?
> Or can we configure postgresql to accept this rise in load ?
> Or another idea ?
>
> When the procedure crash, postgresql use 280 MB of memory and 2 Go of
> virtual memory and on the server we have a message "Windows try to
> increase virtual memory".
>

Perhaps, if the function isn't too big, you could post it so that we
might see what you are trying to do.  As other folks have mentioned, as
variables go out of scope, the memory is freed.  However, if they don't
go out of scope, they won't be freed until the end of the function.  My
concern, like that of others, is that your variables are not going out
of scope (or being undefined explicitly).  The only way to know is to
go through the code.

Sean

This mail has originated outside your organization,
either from an external partner or the Global Internet.
Keep this in mind if you answer this message.

 

Вложения

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

Предыдущее
От: Edmund Bacon
Дата:
Сообщение: Re: Debugging deadlocks
Следующее
От: "Andrus"
Дата:
Сообщение: Compriere or other ERP database dump for Postgres