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 3763BD1BB42 for ; Mon, 17 Nov 2003 22:42:19 +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 68523-08 for ; Mon, 17 Nov 2003 18:41:49 -0400 (AST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 6680BD1B4F5 for ; Mon, 17 Nov 2003 18:41:47 -0400 (AST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 3881A35422; Mon, 17 Nov 2003 14:41:49 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 33CDA35406; Mon, 17 Nov 2003 14:41:49 -0800 (PST) Date: Mon, 17 Nov 2003 14:41:49 -0800 (PST) From: Stephan Szabo To: ow Cc: pgsql-admin@postgresql.org Subject: Re: pg_restore and FK constraints with large dbs In-Reply-To: <20031117214632.54492.qmail@web21404.mail.yahoo.com> Message-ID: <20031117143235.E6696@megazone.bigpanda.com> References: <20031117214632.54492.qmail@web21404.mail.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/322 X-Sequence-Number: 11309 On Mon, 17 Nov 2003, ow wrote: > --- Stephan Szabo wrote: > > > > I assume you're also not modifying the pktable rows (since that would > > access the fk table based solely on the fk). > > I do modify the fk table: inserts and updates (but pk is never updated). Also > do not delete records. > > > Does the multi-field index start with fk or some other field? > Some other field. > > In general, even if I put that additional index and somehow cut down FK > verification time for 1 constraint to, say, 30 min, does that mean that the > problem is solved? Tomorrow, someone may come with 800M fk table against 200K > pk table, or he may have 10 FK constraints like this, etc. How's he going to > restore db in production environment when there's a problem and time is factor? Well, I've been trying to deal with the particular case at hand, ie, get your load in a more reasonable amount of time assuming that you had more constraints and this was going to be a particular problem for you in the immediate term. I've mentioned that there's likely to be future development on the issue in this thread already and that there was a recent discussion on the topic that occurred a bit late to do anything for 7.4. I can't change the past to suit your desires, sorry, the best I can do is point you towards getting a solution for the future.