From: Ludovic Orban <lorban@bitronix.be>
To: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: Kris Jurka <jurka@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Postgres XA support
Date: Mon, 9 Oct 2006 13:51:46 +0200
Message-ID: <c016d00b0610090451h1bc0e89bscf600eb6ba7747cf@mail.gmail.com> (raw)
In-Reply-To: <452A2CA0.2080900@enterprisedb.com>
References: <c016d00b0610071603q63c01a99q8bd165f3cb6a2f04@mail.gmail.com>
<45288F3C.1030906@ejurka.com>
<c016d00b0610080656m4eb3bd1aye1c96b3ace6b8812@mail.gmail.com>
<45297847.7060304@ejurka.com>
<452A2CA0.2080900@enterprisedb.com>
> >> From the comments I saw in the source, transaction interleaving, join
> >> and suspend/resume are still not supported and forget is still
> >> unimplemented. This means you cannot mix local and global
> >> transactions, cannot support EJBs with REQUIRES_NEW CMT declaration
> >> and can get into troubles during crash recovery.
>
> Can you clarify how that can get you into trouble during crash recovery?
Simply because XAResource.forget() is not implemented. You won't
exactly be into trouble because of this but extra manual work might be
needed to check that an after-crash recovery succeeded.
You will have the same doubts when reconciliating the TM logs with the
DB logs after a heuristic decision happened.
> We had a discussion about this earlier, and it seems I never replied to
> your latest comment on the EJB REQUIRES_NEW support. Let me do that now:
>
> AFAICS, the transaction manager can simply keep the original connection
> associated with the original transaction, and open a new connection
> associated with the new transaction when needed. Can you give a specific
> example scenario that's impossible to implement without suspend/resume
> support?
Opening a new connection as you describe would probably work. It is
then the responsibility of the EJB container to implement REQUIRES_NEW
in this way instead of using the TM's suspend service but I don't know
of any container that implements REQUIRES_NEW without calling suspend
on the TM.
> I don't see much value in implementing the full XA spec. What we have
> now is enough to implement distributed transactions reliably, and that's
> what XA is all about.
I disagree. There are some parts of the XA spec that might well be
considered as optional but suspend/resume, ability to mix local/global
transactions and recovery can't be. Yes you can run distributed
transactions reliably but with so many restrictions that it's of no
use.
Please don't get me wrong here. I'm not bashing Postgres nor your work
in any way I'm just saying that it's still lacking features to make it
really usable with XA transactions. Mysql and Ingres fall in exactly
the same category: they provide incomplete (even worse, sometimes
incorrect) XA support as well.
Ludovic
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: lorban@bitronix.be, heikki@enterprisedb.com, jurka@ejurka.com
Subject: Re: Postgres XA support
In-Reply-To: <c016d00b0610090451h1bc0e89bscf600eb6ba7747cf@mail.gmail.com>
References: <c016d00b0610071603q63c01a99q8bd165f3cb6a2f04@mail.gmail.com> <45288F3C.1030906@ejurka.com> <c016d00b0610080656m4eb3bd1aye1c96b3ace6b8812@mail.gmail.com> <45297847.7060304@ejurka.com> <452A2CA0.2080900@enterprisedb.com> <c016d00b0610090451h1bc0e89bscf600eb6ba7747cf@mail.gmail.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