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 970F0D1B4ED for ; Thu, 13 Nov 2003 23:03:21 +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 50273-03 for ; Thu, 13 Nov 2003 19:02:52 -0400 (AST) Received: from web21409.mail.yahoo.com (web21409.mail.yahoo.com [216.136.232.79]) by svr1.postgresql.org (Postfix) with SMTP id 732A5D1B4FE for ; Thu, 13 Nov 2003 19:02:49 -0400 (AST) Message-ID: <20031113230251.64140.qmail@web21409.mail.yahoo.com> Received: from [64.81.205.234] by web21409.mail.yahoo.com via HTTP; Thu, 13 Nov 2003 15:02:51 PST Date: Thu, 13 Nov 2003 15:02:51 -0800 (PST) From: ow Subject: Re: pg_restore and FK constraints with large dbs To: Peter Eisentraut Cc: pgsql-admin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/256 X-Sequence-Number: 11243 --- Peter Eisentraut wrote: > ow writes: > > > 1) dump the data only, create the table with all indexes and constraints > (from > > script that has nothing to do with pg_restore), import the data. The import > > part was running for hours (14+) with no end in sight. Had to kill it. > > Dump the data and the schema and it will do it in the right order. Can you clarify how this would be better than the second option I described? Unless pg_restore can somehow create FK constraints differently (and more efficiently) than using "ALTER TABLE xxx ADD CONSTRAINT", I do not see how this would help. Thanks __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree