Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 963612E003E for ; Wed, 19 Mar 2008 16:06:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 27162-01 for ; Wed, 19 Mar 2008 16:06:50 -0300 (ADT) Received: from mx3.hub.org (mx3.hub.org [206.223.169.73]) by postgresql.org (Postfix) with ESMTP id 25DB02E003D for ; Wed, 19 Mar 2008 16:06:50 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mx3.hub.org (Postfix) with ESMTP id 9D23A37D145 for ; Wed, 19 Mar 2008 16:06:49 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m2JJ6d7Y017409; Wed, 19 Mar 2008 15:06:39 -0400 (EDT) To: Aaron Brown cc: "pgsql-admin@postgresql.org" Subject: Re: pg_restore failing with "ERROR: out of memory" In-reply-to: References: Comments: In-reply-to Aaron Brown message dated "Wed, 19 Mar 2008 13:53:37 -0400" Date: Wed, 19 Mar 2008 15:06:39 -0400 Message-ID: <17408.1205953599@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/146 X-Sequence-Number: 28629 Aaron Brown writes: > Iım attempting to do something that should be a trivially simple task. I > want to do a data only dump from my production data in the public schema and > restore it on another machine. Does it really need to be data-only? A regular schema+data dump usually restores a lot faster. Your immediate problem is probably that it's running out of memory for pending foreign-key triggers. Even if it didn't run out of memory, the ensuing one-tuple-at-a-time checks would take forever. You'd be better off dropping the FK constraint, loading the data, and re-creating the constraint. There's further discussion of bulk-loading tricks in the manual: http://www.postgresql.org/docs/8.2/static/populate.html regards, tom lane