Re: 9.0 Out of memory - Mailing list pgsql-general

From Tom Lane
Subject Re: 9.0 Out of memory
Date
Msg-id 26416.1302673498@sss.pgh.pa.us
Whole thread Raw
In response to Out of memory  (Jeremy Palmer <JPalmer@linz.govt.nz>)
Responses Re: 9.0 Out of memory
List pgsql-general
Jeremy Palmer <JPalmer@linz.govt.nz> writes:
> Ok I have attached the map, or least what I think the map is.

Yup, that's what I was after.  It looks like the main problem is here:

>     PortalHeapMemory: 16384 total in 4 blocks; 5944 free (0 chunks); 10440 used
>       ExecutorState: 122880 total in 4 blocks; 63984 free (8 chunks); 58896 used
>         ExprContext: 2622363000 total in 9 blocks; 21080 free (15 chunks); 2622341920 used

You've evidently got a leak during execution of a query that's being run
in a "portal", which most likely is a cursor or plpgsql FOR-IN-SELECT
query.  Unfortunately there's not enough information here to tell which
query that is, but maybe you can narrow it down now.  I'm guessing that
some specific function or operator you're using in that query is leaking
memory with successive executions.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] PostgreSQL backend process high memory usage issue
Next
From: Sim Zacks
Date:
Subject: Re: Postgres 9.0 + LDAP