Re: Postgres XA support

From: "Ludovic Orban" <lorban(at)bitronix(dot)be>
To: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
Cc: "Kris Jurka" <jurka(at)ejurka(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Postgres XA support
Date: 2006-10-09 11:51:46
Message-ID: c016d00b0610090451h1bc0e89bscf600eb6ba7747cf@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

> >> 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2006-10-09 14:17:37 Re: SENSITIVE resultset
Previous Message Heikki Linnakangas 2006-10-09 11:19:06 Re: Postgres XA support