Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id DCED963447B for ; Sat, 21 Feb 2009 05:43:10 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 92522-10 for ; Sat, 21 Feb 2009 05:43:07 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gx0-f176.google.com (mail-gx0-f176.google.com [209.85.217.176]) by mail.postgresql.org (Postfix) with ESMTP id 8628E633ED9 for ; Sat, 21 Feb 2009 05:43:06 -0400 (AST) Received: by gxk24 with SMTP id 24so4435957gxk.19 for ; Sat, 21 Feb 2009 01:43:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+6Q4vyUcE53n4jtsQmStd9HPj0ANgdlJOiqcO8tLidE=; b=U+LD6s/AFSbyi2vropX3EHVRkqRfa7sAspPLET6hx49hTklVyjdblcp0Qatqd7S1F+ eWpe2Xnid/S0ut2jcJpfuhV/SL5KCMadwnBBVfpkjE/CZghI0Su4pYAjOW8h63gAd9xY Oj29LzKop0YD+XKBfOTMGmsktI53UXS8GZ5H4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=LJ/n+2d3TGlihJUUTJ9gcTnIvRKdMGzgRoxlnnHIjRe8FZKPB6V10kE2aeO/s0rXnK vWrQY4cMqLWaj3RIRugc8cEIDrTTLIqQPqyx33wr5foaD+QEYDyBqJedftrgYI/BjM5u +DS0/izwU5za7cTwBgj8mVwoFssYwbVb1EET4= MIME-Version: 1.0 Received: by 10.151.82.10 with SMTP id j10mr1678795ybl.0.1235209384796; Sat, 21 Feb 2009 01:43:04 -0800 (PST) In-Reply-To: <200902210923.37082@zmi.at> References: <0b99ef815980dac4a445e1eb1da0d130@webmail.zmi.at> <200902210923.37082@zmi.at> Date: Sat, 21 Feb 2009 02:43:04 -0700 Message-ID: Subject: Re: 8.3.5 broken after power fail From: Scott Marlowe To: Michael Monnerie Cc: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200902/168 X-Sequence-Number: 31389 On Sat, Feb 21, 2009 at 1:23 AM, Michael Monnerie wrote: > Also a question: Because I must read all data, the psql client runs out > of memory, trying to cache all the 10GB from that table. I circumvented > this with selecting only parts of the table all the time. Is there a > smart way to do such a select without caching the results in memory? Is > that what temporary tables and "select into" are made for? I just want > to know the recommended way for doing huge queries. You can dump individual tables with pg_dump -t table1 -t table2. That should work without running out of memory. And yeah, temp tables and select into are a good way to get your data ready to be pg_dumped.