Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D79339FB512 for ; Mon, 9 Oct 2006 08:04:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 06380-10 for ; Mon, 9 Oct 2006 08:03:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from webmail.enterprisedb.com (edb04.managed.contegix.com [63.246.7.176]) by postgresql.org (Postfix) with ESMTP id 7283B9FB202 for ; Mon, 9 Oct 2006 08:03:53 -0300 (ADT) Received: from [192.168.0.20] (unknown [62.232.55.86]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by webmail.enterprisedb.com (Postfix) with ESMTP id 1D04CA24DCD; Mon, 9 Oct 2006 06:03:50 -0500 (CDT) Message-ID: <452A2CA0.2080900@enterprisedb.com> Date: Mon, 09 Oct 2006 12:04:00 +0100 From: Heikki Linnakangas User-Agent: Thunderbird 1.5.0.7 (X11/20060915) MIME-Version: 1.0 To: Ludovic Orban CC: Kris Jurka , pgsql-jdbc@postgresql.org Subject: Re: Postgres XA support References: <45288F3C.1030906@ejurka.com> <45297847.7060304@ejurka.com> In-Reply-To: <45297847.7060304@ejurka.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.197 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/50 X-Sequence-Number: 15933 > Ludovic Orban wrote: >> 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? 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: Ludovic Orban wrote: > Heikki Linnakangas wrote: >> Ludovic Orban wrote: >>> Appart from that, suspend/resume is mandatory to implement CMT >>> REQUIRES_NEW semantics of the EJB servers. >> >> Why? Can't you just open a new connection on a REQUIRES_NEW method >> call? > > REQUIRES_NEW requires to start a brand new transaction for the > duration of the call. The only way to do this is to sak the TM to > suspend the current transaction, start the new one and when it's > finished resume the first one. > > Since a transaction is bound to a thread the is no way to do this > other than suspend/resume. 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? >> I think it was Michael Allman that said the engine wasn't able to >> properly support XA in Aug 2005 and unfortunately it seems that things >> haven't changed much since then. >> >> I'm afraid you still have some work to do on the engine before you can >> implement XA in JDBC. > > Well there are two perspectives on this. If you need a way of > implementing multi-resource transactions, than the simple two phase > commit approach implemented in postgresql is adequate. If full XA > compliance is required then postgresql comes up far short. Yes, backend > development has stalled on this. Backend developers were not aware of > the full XA requirements and when informed said, "We implemented all > this two phase stuff and now you're telling us it's inadequate!" So > they've moved on and the ability to do things like transaction > interleaving are very complicated given the postgresql backend model, so > I wouldn't hold my breath on things changing anytime soon. 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. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com