X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 1FDA99FA64B for ; Fri, 23 Jun 2006 14:18:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 56564-01 for ; Fri, 23 Jun 2006 14:18:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 31BF29FA60B for ; Fri, 23 Jun 2006 14:18:23 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k5NHIIEM016807; Fri, 23 Jun 2006 13:18:18 -0400 (EDT) To: "Abu Mushayeed" cc: pgsql-admin@postgresql.org Subject: Re: Out of memory error In-reply-to: References: Comments: In-reply-to "Abu Mushayeed" message dated "Fri, 23 Jun 2006 10:05:51 -0700" Date: Fri, 23 Jun 2006 13:18:18 -0400 Message-ID: <16806.1151083098@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/214 X-Sequence-Number: 22176 "Abu Mushayeed" writes: > AFTER A WHILE THE SYSTEM COMES BACK AND SAYS IN THE LOG FILE: Please turn off your caps lock key :-( > AggContext: -1501569024 total in 351 blocks; 69904 free (507 chunks); > -1501638928 used > DynaHashTable: 302047256 total in 46 blocks; 275720 free (66 chunks); > 301771536 used Hm, it's evidently misjudging how much memory will be needed by a HashAggregate plan, probably because it's underestimating the number of GROUP BY groups. Could we see the EXPLAIN output for the query? What PG version is this exactly? Have you ANALYZEd the table lately? regards, tom lane