Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 4A62E64FE2F for ; Thu, 18 Dec 2008 21:50:54 -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 67154-05 for ; Thu, 18 Dec 2008 21:50:52 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [202.61.230.242]) by mail.postgresql.org (Postfix) with ESMTP id 495E364FC42 for ; Thu, 18 Dec 2008 21:50:51 -0400 (AST) Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by www.postnewspapers.com.au (Postfix) with ESMTP id D3E615C1F6; Fri, 19 Dec 2008 10:50:46 +0900 (WST) Received: from localhost (access [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id B75EA1E0436; Fri, 19 Dec 2008 10:50:46 +0900 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (access.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WJqpblZOcg8c; Fri, 19 Dec 2008 10:50:44 +0900 (WST) Received: from [192.168.44.68] (203-59-94-220.perm.iinet.net.au [203.59.94.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTP id 20CD71E0435; Fri, 19 Dec 2008 10:50:44 +0900 (WST) Message-ID: <494AFDF3.8020903@postnewspapers.com.au> Date: Fri, 19 Dec 2008 10:50:43 +0900 From: Craig Ringer User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: Franck Routier Cc: pgsql-performance@postgresql.org Subject: Re: pg_restore : out of memory References: <1228399715.16894.22.camel@franck-laptop> In-Reply-To: <1228399715.16894.22.camel@franck-laptop> X-Enigmail-Version: 0.95.0 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: 200812/170 X-Sequence-Number: 32206 Franck Routier wrote: > Hi, > > I am trying to restore a table out of a dump, and I get an 'out of > memory' error. - Operating system? - PostgreSQL version? - PostgreSQL configuration - work_mem, shared_buffers, etc? > So, here is my question : is pg_restore supposed to eat all memory ? No, but PostgreSQL's backends will if you tell them there's more memory available than there really is. > and > is there something I can do to prevent that ? Adjust your PostgreSQL configuration to ensure that shared_buffers, work_mem, etc are appropriate for the system and don't tell Pg to use more memory than is actually available. pg_restore isn't using up your memory. The PostgreSQL backend is. -- Craig Ringer