X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 32EC011F61D9 for ; Mon, 10 Apr 2006 14:19:58 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.12 X-Spam-Level: X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id lCU7zeodjtbb for ; Mon, 10 Apr 2006 14:19:52 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from peufeu.com (boutiquenumerique.com [82.67.9.10]) by postgresql.org (Postfix) with ESMTP id B7F0811F60E3 for ; Mon, 10 Apr 2006 14:19:51 -0300 (ADT) Received: (qmail 1012 invoked from network); 10 Apr 2006 19:20:35 +0200 Received: from boutiquenumerique.com (HELO apollo13) (82.67.9.10) by boutiquenumerique.com with SMTP; 10 Apr 2006 19:20:35 +0200 Date: Mon, 10 Apr 2006 19:20:33 +0200 To: "Jesper Krogh" , pgsql-performance@postgresql.org Subject: Re: Restore performance? References: From: PFC Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: User-Agent: Opera M2/8.51 (Linux, build 1462) X-Archive-Number: 200604/212 X-Sequence-Number: 18296 > I'd run pg_dump | gzip > sqldump.gz on the old system. If the source and destination databases are on different machines, you can pipe pg_dump on the source machine to pg_restore on the destination machine by using netcat. If you only have 100 Mbps ethernet, compressing the data will be faster. If you have Gb Ethernet, maybe you don't need to compress, but it doesn't hurt to test. use pg_restore instead of psql, and use a recent version of pg_dump which can generate dumps in the latest format. If you need fast compression, use gzip -1 or even lzop, which is incredibly fast. Turn off fsync during the restore and set maintenance_work_mem to use most of your available RAM for index creation. I think that creating foreign key constraints uses large joins ; it might be good to up work_mem also. Check the speed of your disks with dd beforehand. You might get a surprise. Maybe you can also play with the bgwriter and checkpoint parameters.