X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 4BDA1D1B4D5 for ; Mon, 5 Jan 2004 18:58:07 +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 43054-01 for ; Mon, 5 Jan 2004 14:57:17 -0400 (AST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 538EFD1B43A for ; Mon, 5 Jan 2004 14:57:17 -0400 (AST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 7A15B354A9; Mon, 5 Jan 2004 10:57:02 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 74F803548C; Mon, 5 Jan 2004 10:57:02 -0800 (PST) Date: Mon, 5 Jan 2004 10:57:02 -0800 (PST) From: Stephan Szabo To: Bruno Wolff III Cc: Vivek Khera , pgsql-performance@postgresql.org Subject: Re: deferred foreign keys In-Reply-To: <20040105183859.GA28448@wolff.to> Message-ID: <20040105105401.C72490@megazone.bigpanda.com> References: <3FF4FA25.7050802@familyhealth.com.au> <20040105183859.GA28448@wolff.to> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/43 X-Sequence-Number: 5218 On Mon, 5 Jan 2004, Bruno Wolff III wrote: > On Mon, Jan 05, 2004 at 11:33:40 -0500, > Vivek Khera wrote: > > > > Thanks. Then it sorta makes it moot for me to try deferred checks, > > since the Pimary and Foreign keys never change once set. I wonder > > what is making the transactions appear to run lockstep, then... > > I think this is probably the issue with foreign key checks needing an > exclusive lock, since there is no shared lock that will prevent deletes. But, if he's updating the fk table but not the keyed column, it should no longer be doing the check and grabbing the locks. If he's seeing it grab the row locks still a full test case would be handy because it'd probably mean we missed something.