X-Original-To: pgsql-sql@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 155D99258ED for ; Mon, 19 May 2003 18:06:08 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 33058-04 for ; Mon, 19 May 2003 18:06:00 -0400 (EDT) Received: from europa.janwieck.net (h00045a2e4e7c.ne.client2.attbi.com [24.131.181.55]) by developer.postgresql.org (Postfix) with ESMTP id 54AB3925A54 for ; Mon, 19 May 2003 15:20:18 -0400 (EDT) Received: from Yahoo.com (linksys.janwieck.net [192.168.192.1]) (authenticated) by europa.janwieck.net (8.11.6/8.11.6) with ESMTP id h4JJK2a02925; Mon, 19 May 2003 15:20:02 -0400 Message-ID: <3EC92E3F.6080703@Yahoo.com> Date: Mon, 19 May 2003 15:19:27 -0400 From: Jan Wieck Organization: Unorganized User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: Matt Mello , pgsql-sql@postgresql.org Subject: Re: "deadlock detected" documentation References: <3EB82DA1.7020809@spaceship.com> <24809.1052282819@sss.pgh.pa.us> <3EC32935.5040005@spaceship.com> <7737.1053003625@sss.pgh.pa.us> <3EC3C239.7070708@spaceship.com> <10096.1053017383@sss.pgh.pa.us> <3EC3C77A.3010006@spaceship.com> <10286.1053018824@sss.pgh.pa.us> <3EC3E53C.9070800@spaceship.com> <3EC50CEB.9080202@spaceship.com> <28936.1053112428@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/367 X-Sequence-Number: 13532 Tom Lane wrote: > Matt Mello writes: > >>The two situations I can think of are: >>1) Two FK fields in a single row pointing to 2 different FK tables, for >>which any 2 updates get locks in opposite order (seems like a deadlock). > > > I don't think this is possible, at least in 7.3. All backends are > guaranteed to run the triggers of a given table in the same order, > so the foreign-row locks should be acquired in the same column order > in all cases. Except the sessions set deferred modes differently. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #