X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 511539FB1BA for ; Thu, 1 Jun 2006 01:31:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 33972-08 for ; Thu, 1 Jun 2006 01:31:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by postgresql.org (Postfix) with ESMTP id 905119FB1B8 for ; Thu, 1 Jun 2006 01:31:07 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1Flepa-0004yM-00; Thu, 01 Jun 2006 00:30:46 -0400 To: "Jim C. Nasby" Cc: Greg Stark , Brendan Duddridge , Tom Lane , PostgreSQL Performance Subject: Re: App very unresponsive while performing simple update References: <961F6F02-4B00-494C-B071-6DF76A305C14@clickspace.com> <21B15664-F4EE-462C-88B4-EEEB2B4A979F@clickspace.com> <874pzanvk6.fsf@stark.xeocode.com> <17733.1148832292@sss.pgh.pa.us> <3C756C36-DC66-4D13-B2CE-99CFCE7BF390@clickspace.com> <87hd39n3c4.fsf@stark.xeocode.com> <20060531062307.GG53487@pervasive.com> <874pz6jjze.fsf@stark.xeocode.com> <20060601031805.GI53487@pervasive.com> In-Reply-To: <20060601031805.GI53487@pervasive.com> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 01 Jun 2006 00:30:46 -0400 Message-ID: <87hd35ijk9.fsf@stark.xeocode.com> Lines: 66 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/2 X-Sequence-Number: 19359 "Jim C. Nasby" writes: > I tried duplicating this but couldn't. What's the data in the tables? Sorry, I had intended to include the definition and data: stark=> create table t1 (a integer primary key, b integer); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t1_pkey" for table "t1" CREATE TABLE stark=> create table t2 (a integer, b integer primary key); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t2_pkey" for table "t2" CREATE TABLE stark=> insert into t1 values (1,2); INSERT 0 1 stark=> insert into t2 values (1,2); INSERT 0 1 stark=> alter table t1 add constraint fk foreign key (b) references t2 deferrable initially deferred ; ALTER TABLE stark=> alter table t2 add constraint fk foreign key (a) references t1 deferrable initially deferred ; ALTER TABLE stark=> \d t1 Table "public.t1" Column | Type | Modifiers --------+---------+----------- a | integer | not null b | integer | Indexes: "t1_pkey" PRIMARY KEY, btree (a) Foreign-key constraints: "fk" FOREIGN KEY (b) REFERENCES t2(b) DEFERRABLE INITIALLY DEFERRED stark=> \d t2 Table "public.t2" Column | Type | Modifiers --------+---------+----------- a | integer | b | integer | not null Indexes: "t2_pkey" PRIMARY KEY, btree (b) Foreign-key constraints: "fk" FOREIGN KEY (a) REFERENCES t1(a) DEFERRABLE INITIALLY DEFERRED stark=> select * from t1; a | b ---+--- 1 | 2 (1 row) stark=> select * from t2; a | b ---+--- 1 | 2 (1 row) -- greg