Re: 9.0 Out of memory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeremy Palmer <JPalmer(at)linz(dot)govt(dot)nz>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: 9.0 Out of memory
Date: 2011-04-13 05:44:58
Message-ID: 26416.1302673498@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeremy Palmer <JPalmer(at)linz(dot)govt(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sim Zacks 2011-04-13 07:14:27 Re: Postgres 9.0 + LDAP
Previous Message Tom Lane 2011-04-13 05:29:43 Re: [GENERAL] PostgreSQL backend process high memory usage issue