Re: plperl doesn't release memory - Mailing list pgsql-general

From Tom Lane
Subject Re: plperl doesn't release memory
Date
Msg-id 27444.1111682043@sss.pgh.pa.us
Whole thread Raw
In response to Re: plperl doesn't release memory  (Sven Willenberger <sven@dmv.com>)
Responses Re: plperl doesn't release memory
List pgsql-general
Sven Willenberger <sven@dmv.com> writes:
> Any suggestions on how to trace what is going on? Debug output methods?

The first thing to figure out is whether the leak is inside Perl or in
Postgres proper.  If I were trying to do this I'd run the function a
couple times, then attach to the (idle) backend with gdb and do
    call MemoryContextStats(TopMemoryContext)
to dump a summary of Postgres' memory usage to stderr.  If that doesn't
show any remarkable bloat then the problem is inside Perl (and beyond my
ability to do much with).

One thing I'm still a bit baffled about is why my test didn't show a
problem; it sure looks identical to yours.  Maybe the issue is Perl
version specific?  I tested using the current FC3 version, which is
perl-5.8.5-9.

            regards, tom lane

pgsql-general by date:

Previous
From: fabrizio ravazzini
Date:
Subject: Pgsql 8.0 on Win32 Production env.
Next
From: Gianni Mariani
Date:
Subject: budiling postgresql-8.0.1 on Linux with GCC 4