Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id AC9019FB1BA for ; Fri, 2 Feb 2007 11:47:05 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 47942-07 for ; Fri, 2 Feb 2007 11:46:58 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id E3B2C9FA22A for ; Fri, 2 Feb 2007 11:46:58 -0400 (AST) 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 l12FkrWN021990; Fri, 2 Feb 2007 10:46:53 -0500 (EST) To: =?ISO-8859-1?Q?G=E1briel_=C1kos?= cc: pgsql-performance@postgresql.org Subject: Re: trouble with a join on OS X In-reply-to: <45C34FC6.2020704@i-logic.hu> References: <8FD54F8B-792B-4333-8C73-AAFD2992C17F@umn.edu> <45C34E80.7010805@archonet.com> <45C34FC6.2020704@i-logic.hu> Comments: In-reply-to =?ISO-8859-1?Q?G=E1briel_=C1kos?= message dated "Fri, 02 Feb 2007 15:50:46 +0100" Date: Fri, 02 Feb 2007 10:46:53 -0500 Message-ID: <21989.1170431213@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/18 X-Sequence-Number: 23072 =?ISO-8859-1?Q?G=E1briel_=C1kos?= writes: > Richard Huxton wrote: >> Kirk Wythers wrote: >>> I am trying to do fairly simple joins on climate databases that should >>> return ~ 7 million rows of data. > If you look at the message carefully, it looks like (for me) that the > client is running out of memory. Can't allocate that 8,4MB :) Right, the join result doesn't fit in the client's memory limit. This is not too surprising, as the out-of-the-box ulimit settings on Tiger appear to be $ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) 6144 file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 256 pipe size (512 bytes, -p) 1 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 266 virtual memory (kbytes, -v) unlimited $ 6 meg of memory isn't gonna hold 7 million rows ... so either raise "ulimit -d" (quite a lot) or else use a cursor to fetch the result in segments. regards, tom lane