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-15 21:52:47 |
Message-ID: | 20079.1221515567@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:
> I see, I was looking at the log entries wrong, sorry. This is Postgres
> 8.3.3 + an xml.c patch (from Kris -
> http://archives.postgresql.org/pgsql-general/2008-07/msg00110.php) to fix
> a memory leak there. The EXPLAIN for this query was this:
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?
> I'm also seeing this TopMemoryContext output in the logs from some other
> situations (sorry I'm not familiar with what/how this gets logged), like
> this autovacuum task that appears to dump this into the log:
The memory context dump happens when we're about to report an "out of
memory" error, so actually the relevant ERROR line would come after the
context dump not before. I'm supposing it's another instance of the
same problem, since the main bloat seems to be here:
> ExecutorState: 1019641424 total in 92998 blocks; 6834024 free (66
> chunks); 1012807400 used
> TIDBitmap: 4186112 total in 9 blocks; 1774784 free (26 chunks);
> 2411328 used
> TupleSort: 31449136 total in 13 blocks; 3451184 free (12 chunks);
> 27997952 used
Thinking about it, it's actually a bit hard to see how it could be an
xml.c problem --- AFAIR that code should only be running in per-tuple
contexts. A leak at the ExecutorState level might perhaps have
something to do with misbehaving aggregates, or some such. Anyway we
really need an example query to test in order to find it.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | pcreso | 2008-09-15 22:05:25 | foreign key problem |
Previous Message | Scott Marlowe | 2008-09-15 21:52:08 | Re: Pg 8.3 tuning recommendations for embedded low-memory device (for OLPC :-) ) |