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 EF70D9FA682 for ; Thu, 1 Jun 2006 00:18:20 -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 28404-01 for ; Thu, 1 Jun 2006 00:18:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 25C3F9FA5EA for ; Thu, 1 Jun 2006 00:18:08 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id EA83256408; Wed, 31 May 2006 22:18:07 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Wed, 31 May 2006 22:18:06 -0500 Date: Wed, 31 May 2006 22:18:05 -0500 From: "Jim C. Nasby" To: Greg Stark Cc: Brendan Duddridge , Tom Lane , PostgreSQL Performance Subject: Re: App very unresponsive while performing simple update Message-ID: <20060601031805.GI53487@pervasive.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874pz6jjze.fsf@stark.xeocode.com> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060601:gsstark@mit.edu::6n68oiAybN9CKmJh:004ymy X-Hashcash: 1:20:060601:brendan@clickspace.com::pIN1rLlVKhBS0/KG:000000000000000 000000000000000000000000Bw6/ X-Hashcash: 1:20:060601:tgl@sss.pgh.pa.us::2ojmgGbbO7ssy5BR:00000000000000000000 0000000000000000000000000aW1 X-Hashcash: 1:20:060601:pgsql-performance@postgresql.org::0SXmYTZOFQTqQJqe:00000 00000000000000000000000092Jc X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/1 X-Sequence-Number: 19358 On Wed, May 31, 2006 at 11:24:05AM -0400, Greg Stark wrote: > stark=> begin; > BEGIN > stark=> begin; > BEGIN > stark=> update t1 set a = 0; > UPDATE 1 > stark=> update t1 set a = 1; > UPDATE 1 > > stark=> update t2 set b = 0; > UPDATE 1 > stark=> update t2 set b = 2; > UPDATE 1 > stark=> commit; > stark=> commit; > ERROR: deadlock detected > DETAIL: Process 16531 waits for ShareLock on transaction 245131; blocked by process 16566 > Process 16566 waits for ShareLock on transaction 245132; blocked by process 16531. > CONTEXT: SQL statement "SELECT 1 FROM ONLY "public"."t1" x WHERE "a" = $1 FOR SHARE OF x" > stark=> > > COMMIT I tried duplicating this but couldn't. What's the data in the tables? -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461