Skip site navigation (1) Skip section navigation (2)

Re: XA support

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: XA support
Date: 2005-06-30 23:05:14
Message-ID: 42C47AAA.2010302@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Heikki Linnakangas wrote:

> This is essentially impossible with approach B, if the ... part uses the
> connection for some other xid. Otherwise, should work.

Right, I was thinking about implications for the other approaches.

> Note that the XA term "thread of control" actually means a connection in
> JTA terms. It doesn't make any difference which java thread does work.
> See JTA spec, section 3.4.3.

Ah, ok, that makes a lot more sense then :-)

> I'm leaning towards approach C myself [...]

Blocking seems really dangerous :( It seems quite likely that you could
deadlock against yourself..

> since it's the simplest to
> implement and doesn't cause any unexpected prepares.

Yeah, I thought some more about that and B is really bad from the
unexpected prepare angle. If we're preparing before the TM asks us to
(and therefore have transaction showing up as prepared in recovery) it
seems possible that a TM will incorrectly decide to commit those after
recovery.

> Or possibly even violating the spec and not allowing to start another transaction before the previous one has been prepared.

This actually sounds like the best thing now as it produces obvious,
easy-to-diagnose errors when you do something that the driver doesn't
yet support.

-O

In response to

pgsql-jdbc by date

Next:From: Dave CramerDate: 2005-06-30 23:45:18
Subject: Re: jdbc cts final diff for review
Previous:From: Kris JurkaDate: 2005-06-30 20:31:31
Subject: Re: Problem with datestyle and driver jdbc

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group