X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 96C82534B5 for ; Thu, 24 Mar 2005 19:40:26 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 43077-06 for ; Thu, 24 Mar 2005 19:40:24 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 088FB53474 for ; Thu, 24 Mar 2005 19:40:21 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j2OJeMPI005021; Thu, 24 Mar 2005 14:40:22 -0500 (EST) To: "Chris Hoover" Cc: "PostgreSQL Admin" Subject: Re: Copying large tables with DBLink In-reply-to: <42430E20.1010600@sermonaudio.com> References: <42430E20.1010600@sermonaudio.com> Comments: In-reply-to "Chris Hoover" message dated "Thu, 24 Mar 2005 13:59:44 -0500" Date: Thu, 24 Mar 2005 14:40:22 -0500 Message-ID: <5020.1111693222@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/403 X-Sequence-Number: 16901 "Chris Hoover" writes: > Has anyone had problems with memory exhaustion and dblink? We were > trying to use dblink to convert our databases to our new layout, and had > our test server lock up several times when trying to copy a table that > was significantly larger than our memory and swap. You're not going to be able to do that with dblink, nor any other set-returning function, because the current implementation of SRFs always materializes the entire function result in temporary memory/swap. Consider something like pg_dump -t srctab srcdb | psql destdb instead. regards, tom lane