X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id EFA419FB26A for ; Thu, 3 Aug 2006 16:37:13 -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 59063-10 for ; Thu, 3 Aug 2006 16:37:10 -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 EBAEC9FB259 for ; Thu, 3 Aug 2006 16:37:09 -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 k73Jb7bs024022; Thu, 3 Aug 2006 15:37:07 -0400 (EDT) To: jason nordwick cc: pgsql-sql@postgresql.org Subject: Re: Error: out of memory in create table as In-reply-to: <44D22CA7.3060901@adapt.com> References: <44D22CA7.3060901@adapt.com> Comments: In-reply-to jason nordwick message dated "Thu, 03 Aug 2006 10:04:39 -0700" Date: Thu, 03 Aug 2006 15:37:07 -0400 Message-ID: <24021.1154633827@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.164 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/31 X-Sequence-Number: 25989 jason nordwick writes: > ERROR: out of memory > DETAIL: Failed on request of size 856. > CONTEXT: SQL statement "create table gwt as select * from gworktick" > PL/pgSQL function "processadd" line 30 at SQL statement What PG version? What does "explain select * from gworktick" say? Can you get explain analyze results, or does that fail with the same error? > work_mem = 512000 # min 64, size in KB This could well be excessive for complicated views. You're promising that you can provide half a gig of RAM for *each* sort or hash in the plan. regards, tom lane