X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C086ED1B4E1 for ; Wed, 12 Nov 2003 16:56:06 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 20184-08 for ; Wed, 12 Nov 2003 12:55:36 -0400 (AST) Received: from web21401.mail.yahoo.com (web21401.mail.yahoo.com [216.136.232.71]) by svr1.postgresql.org (Postfix) with SMTP id 94D8CD1B4F2 for ; Wed, 12 Nov 2003 12:55:35 -0400 (AST) Message-ID: <20031112165534.98881.qmail@web21401.mail.yahoo.com> Received: from [64.81.205.234] by web21401.mail.yahoo.com via HTTP; Wed, 12 Nov 2003 08:55:34 PST Date: Wed, 12 Nov 2003 08:55:34 -0800 (PST) From: ow Subject: [pg 7.1.rc2] pg_restore and large tables To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/209 X-Sequence-Number: 11196 Hi, Trying to restore a table that has about 80 million records. The database was dumped and restored according to the following procedure: 1) dump the db, data only time /usr/local/pgsql/bin/pg_dump -abf ./pgsql.7.4.rc1.pgdump.Z --format=c --compress=6 -U postgres testdb 2) create db schema from a separate file, including table structures, constraints, indexes 3) edit restore order to satisfy the constraints 4) restore the db time /usr/local/pgsql/bin/pg_restore -d testdb -U postgres -a ./pgsql.7.4.rc1.pgdump.Z -L ./restoreOrder.txt --verbose pg_restore has been running for 14 hours now and it does not appear that there's any end in sight. Meanwhile, postmaster is slowly eating away at the memory, it now has 46% of all available memory with about 900MB on swap. HD activity is non-stopping. In retrospective, I guess, the table with 80M records could've been created without indexes (it has 3, pk & ak constraints and fk index) to speed up the pg_restore ... but then I'm not sure if creating the indexes afterwards would've been much faster. Anything I'm doing wrong? Thanks __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree