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 EC10BD1B560 for ; Fri, 14 Nov 2003 16:22:18 +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 18471-04 for ; Fri, 14 Nov 2003 12:21:48 -0400 (AST) Received: from web21402.mail.yahoo.com (web21402.mail.yahoo.com [216.136.232.72]) by svr1.postgresql.org (Postfix) with SMTP id C61BAD1B544 for ; Fri, 14 Nov 2003 12:21:47 -0400 (AST) Message-ID: <20031114162146.44040.qmail@web21402.mail.yahoo.com> Received: from [64.81.205.234] by web21402.mail.yahoo.com via HTTP; Fri, 14 Nov 2003 08:21:46 PST Date: Fri, 14 Nov 2003 08:21:46 -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/272 X-Sequence-Number: 11259 --- Peter Eisentraut wrote: > If you you pg_dump and dump schema and data together, then there is some > magic to temporarily disable foreign key constraints. Try it out. > Perhaps you can adopt the statements to your particular restoration method > as well, if it turns out necessary. > No longer have the db to extract data and schema together (have only data extracts), but I'll try later. However, if FK constraints are temporarily disabled in pg_restore, why is it necessary to arrage the statimements in the order that satisfies FK constraints? One could be doing this for days ... Wouldn't be simpler for pg_restore to do the following: 1) create table structures only (no indexes or constraints) 2) create indexes 3) create constraints This way, there's no need to rearrange the order of imports. Thanks __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree