Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 78187632992 for ; Mon, 14 Jun 2010 09:54:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 72211-06 for ; Mon, 14 Jun 2010 12:54:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from beaker.bytemark.co.uk (beaker.bytemark.co.uk [80.68.81.2]) by mail.postgresql.org (Postfix) with ESMTP id 7B90A632403 for ; Mon, 14 Jun 2010 09:54:39 -0300 (ADT) Received: from tetrarch.vm.bytemark.co.uk ([89.16.174.118] helo=mail.audioboundary.com) by beaker.bytemark.co.uk with esmtp (Exim 4.69) (envelope-from ) id 1OO9BW-0003aL-25 for pgsql-performance@postgresql.org; Mon, 14 Jun 2010 13:54:38 +0100 Received: from [86.6.239.186] (cpc5-lewi13-2-0-cust185.know.cable.virginmedia.com [86.6.239.186]) by mail.audioboundary.com (Postfix) with ESMTPSA id C807FE048F for ; Mon, 14 Jun 2010 13:54:34 +0100 (BST) Message-ID: <4C162680.8090502@audioboundary.com> Date: Mon, 14 Jun 2010 13:54:24 +0100 From: Tom Molesworth User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9pre) Gecko/20100217 Shredder/3.0.3pre MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Dead lock References: <4C161793.2090105@acteos.com> In-Reply-To: <4C161793.2090105@acteos.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-10 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201006/243 X-Sequence-Number: 39099 On 14/06/10 12:50, Elias Ghanem wrote: > SELECT INTO DUMMY DBLINK_EXEC(''CONNECTION_STRING TO DB3', > ''UPDATE IN_FICHE_PRODUIT SET VALIDE = 1''); If there's more than one value in that table, an explicit ORDER BY might help (otherwise you could get the situation where query A will update in the order 1,2,3 and query B will do 3,2,1 so neither will be able to get the requested locks until the other query has finished). Tom