Re: Out of memory on SELECT (from sort?) in 8.3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Matt Magoffin" <postgresql(dot)org(at)msqr(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Out of memory on SELECT (from sort?) in 8.3
Date: 2008-09-16 01:01:01
Message-ID: 9515.1221526861@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Matt Magoffin" <postgresql(dot)org(at)msqr(dot)us> writes:
>> Is this particular query using xml features, and if so which? Actually,
>> could you just show us the whole query and the schemas of the tables
>> it's using?

> No, other than returning a column of type xml.

Huh, I was overthinking the problem. xml_out has a memory leak :-(

More than one in fact: a large leak (equal to size of output) in
the executor context (hence query lifespan) and a small one in
LibxmlContext (hence transaction lifespan).

Try the patch here:
http://archives.postgresql.org/pgsql-committers/2008-09/msg00159.php

(In the long run it might be better if we didn't run datatype output
functions in a query-lifespan context ...)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Williamson 2008-09-16 01:17:35 Re: Obfuscated stored procedures (was Re: Oracle andPostgresql)
Previous Message Tarah M. Wheeler 2008-09-16 00:55:04 unsubscribe