Re: out of memory during query execution - Mailing list pgsql-general

From Tom Lane
Subject Re: out of memory during query execution
Date
Msg-id 29983.1135095318@sss.pgh.pa.us
Whole thread Raw
In response to Re: out of memory during query execution  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: out of memory during query execution
List pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Tue, Dec 20, 2005 at 01:35:03PM +0100, DANTE ALEXANDRA wrote:
>> You will find below the explain plan of one of the queries which has
>> finished with "out of memory". This query contains aggregate and a
>> sub-select with 6 joins :

> 1. Firstly, it could be the Hash node. Does the estimated number of
> matches in part (96000 rows) match reality?

Actually, the hash on "supplier" (3000000 rows) looks like a bigger
risk.  But if this is 8.1 then there is code in there to spill oversize
hash tables to disk, so I don't understand where the memory is going.

The "out of memory" failure should have provoked a MemoryContextStats
report in the postmaster log.  Are there a bunch of lines like
    %s: %ld total in %ld blocks; %ld free (%ld chunks); %ld used
and if so could we see 'em?

            regards, tom lane

pgsql-general by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: One DB not backed up by pg_dumpall
Next
From: Tom Lane
Date:
Subject: Re: is this a bug or I am blind?