Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 66DF79FB54B for ; Mon, 9 Oct 2006 08:52:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 24869-08 for ; Mon, 9 Oct 2006 11:51:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by postgresql.org (Postfix) with ESMTP id AEC5C9FB549 for ; Mon, 9 Oct 2006 08:51:48 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id m18so1794051nfc for ; Mon, 09 Oct 2006 04:51:47 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=reHD7E84F0IICq23S1D0wVIsBcD5GbKD12PSnwDn+b1zQizYhjLeEHuUXbDG/zOkmZGKm0uGuZPTe4drTvZgzjckmLRRgb1KtyLAG/SUDslf0poDBl8Q4psBNoVW/JG75N0lXB0yuB/3G1AqSdi6u9C43xk6+NHBnf08glp72Ic= Received: by 10.49.90.4 with SMTP id s4mr1841226nfl; Mon, 09 Oct 2006 04:51:47 -0700 (PDT) Received: by 10.49.65.16 with HTTP; Mon, 9 Oct 2006 04:51:46 -0700 (PDT) Message-ID: Date: Mon, 9 Oct 2006 13:51:46 +0200 From: "Ludovic Orban" To: "Heikki Linnakangas" Subject: Re: Postgres XA support Cc: "Kris Jurka" , pgsql-jdbc@postgresql.org In-Reply-To: <452A2CA0.2080900@enterprisedb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45288F3C.1030906@ejurka.com> <45297847.7060304@ejurka.com> <452A2CA0.2080900@enterprisedb.com> X-Google-Sender-Auth: 2eb407ba4ce81135 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/62 X-Sequence-Number: 15945 > >> 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