Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id E35B19FB6CC; Mon, 12 Feb 2007 15:21:04 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 71028-08; Mon, 12 Feb 2007 15:20:53 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id A20E49FB4EF; Mon, 12 Feb 2007 15:20:52 -0400 (AST) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Mon, 12 Feb 2007 19:20:51 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 12 Feb 2007 13:20:51 -0600 Subject: Re: Deadlock on transaction From: Scott Marlowe To: Ezequias Rodrigues da Rocha Cc: pgsql-sql@postgresql.org, pgsql-admin@postgresql.org In-Reply-To: <55c095e90702121008u6d3d27c0m16e52d63f97c3e7d@mail.gmail.com> References: <55c095e90702120943v2909044eo91445b0eda3958c7@mail.gmail.com> <1171302488.3565.15.camel@state.g2switchworks.com> <55c095e90702121008u6d3d27c0m16e52d63f97c3e7d@mail.gmail.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1171308051.3565.18.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 12 Feb 2007 13:20:51 -0600 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL, BAYES_50, SPF_PASS, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200702/167 X-Sequence-Number: 24632 On Mon, 2007-02-12 at 12:08, Ezequias Rodrigues da Rocha wrote: > I mean really deadlock. Other transactions can't access the database > until the main transaction is complete. A question: > > PostgreSQL doesn't permit multiple transactions concurrently ? Again, that's not a deadlock. A deadlock would mean that the transaction causing the lock never returned, because it wound up waiting for another transaction that was in turn waiting on it. i.e. begin transaction a begin trasnaction b a does something that waits on b b does something that waits on a neither transaction can complete. What you have is a blocking transaction. In postgresql, very few transactions tend to block other transactions. Have you got a test case that demonstrates your problem with blocking?