pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki@enterprisedb.com>
To: ludovic orban <ludovic.orban@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: XA end then join fix for WebLogic
Date: Fri, 10 Nov 2006 16:07:52 +0000
Message-ID: <4554A3D8.3050301@enterprisedb.com> (raw)
In-Reply-To: <c016d00b0611100543v63e31d0dwd7840b07129d557@mail.gmail.com>
References: <c016d00b0610310758s3dadc02w954de80c678be462@mail.gmail.com>
	<4547C128.40404@enterprisedb.com>
	<c016d00b0611010202m3438da13t4035164c822f1b78@mail.gmail.com>
	<45487C70.6000604@enterprisedb.com>
	<c016d00b0611010407vfa765bfx53da8c128e0e1108@mail.gmail.com>
	<45507CB9.2020206@enterprisedb.com>
	<c016d00b0611080139t1f4ec672n8f216b7fbd0b759@mail.gmail.com>
	<4551B0C5.3010708@enterprisedb.com>
	<c016d00b0611090122m4c833aabr37c966955563583b@mail.gmail.com>
	<455378EB.4060409@enterprisedb.com>
	<c016d00b0611100543v63e31d0dwd7840b07129d557@mail.gmail.com>

ludovic orban wrote:
>> > This has absolutely nothing to do
>> > with XA nor interleaved transactions and you could reproduce the exact
>> > same behavior with two different connections.
>>
>> I challenge you to do so. ;)
> 
> Done. See attached test case.

Ahh, I see what you mean now.

Technically, with your modified test case, what you get is not a 
*deadlock*, it's a serialization error. Which is different: the deadlock 
in my original test case doesn't get resolved until a timeout kicks in, 
whereas in your modified test case the serialization error is detected 
as soon as A commits.

Actually, I'm surprised that Firebird notices the deadlock in my 
original test case at all.

You can "fix" the test case by changing the commit call in the Committer 
thread to a rollback. What should then happen is that the second update 
  continues as soon as A rolls back. There's no conflict because A 
rolled back, right?. With that modification, your test case runs OK, and 
mine throws the same exception as before.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



view thread (21+ messages)  latest in thread

Message-ID: <4554A3D8.3050301@enterprisedb.com>
Permalink:  ../4554A3D8.3050301@enterprisedb.com/
Also on:    postgresql.org/message-id/4554A3D8.3050301@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: heikki@enterprisedb.com, ludovic.orban@gmail.com
  Subject: Re: XA end then join fix for WebLogic
  In-Reply-To: <4554A3D8.3050301@enterprisedb.com>
  References: <c016d00b0610310758s3dadc02w954de80c678be462@mail.gmail.com> <4547C128.40404@enterprisedb.com> <c016d00b0611010202m3438da13t4035164c822f1b78@mail.gmail.com> <45487C70.6000604@enterprisedb.com> <c016d00b0611010407vfa765bfx53da8c128e0e1108@mail.gmail.com> <45507CB9.2020206@enterprisedb.com> <c016d00b0611080139t1f4ec672n8f216b7fbd0b759@mail.gmail.com> <4551B0C5.3010708@enterprisedb.com> <c016d00b0611090122m4c833aabr37c966955563583b@mail.gmail.com> <455378EB.4060409@enterprisedb.com> <c016d00b0611100543v63e31d0dwd7840b07129d557@mail.gmail.com> <4554A3D8.3050301@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox