Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id E07FA1337B96 for ; Tue, 26 Apr 2011 06:58:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 99015-09 for ; Tue, 26 Apr 2011 09:58:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mail.postgresql.org (Postfix) with ESMTP id 752291337B81 for ; Tue, 26 Apr 2011 06:58:16 -0300 (ADT) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3Q9wEuS012004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 26 Apr 2011 05:58:14 -0400 Received: from [10.3.113.107] (ovpn-113-107.phx2.redhat.com [10.3.113.107]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3Q9wCVA015792; Tue, 26 Apr 2011 05:58:13 -0400 Message-ID: <4DB697E1.1080506@redhat.com> Date: Tue, 26 Apr 2011 11:01:05 +0100 From: Michael Musgrove User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b2 Thunderbird/3.1.9 ThunderBrowse/3.3.3 MIME-Version: 1.0 To: Heikki Linnakangas CC: Tom Lane , pgsql-bugs@postgresql.org Subject: Re: BUG #5297: Add XATMI C API References: <4DB04E1D.6000301@redhat.com> <24817.1303404224@sss.pgh.pa.us> <4DB063AB.1040800@redhat.com> <4DB07D3B.2010504@enterprisedb.com> In-Reply-To: <4DB07D3B.2010504@enterprisedb.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/197 X-Sequence-Number: 30116 We would certainly be very interested in testing XA support. Our project is called BlackTie - it's an XATMI implementation. We use the JBossTS transaction manager for the transaction engine - although JBossTS is written in Java, providing XA support was reasonably easy since it conforms to the OTS specification which means we can control transactions from a C based XA environment. There is an example of using different resource managers within transactions: https://svn.jboss.org/repos/blacktie/trunk/atmibroker-xatmi/src/example/txfooapp The files ora.c and db2.c show user code accessing resources from two different vendors - the XA specific information is defined in btconfig.xml (basically it just exposes the XA open string, the symbol name of the xa switch structure and the name of the library that exports the switch symbol). > On 21.04.2011 20:04, Michael Musgrove wrote: >> I am referring to the X/Open specification Distributed Transaction >> Processing: The XA Specification >> (pubs.opengroup.org/onlinepubs/009680699/toc.pdf). If postgresql >> provides a conforming Resource Manager switch then we can include >> postgresql work along with interactions with other Resource Managers >> (Oracle, DB2) in the same transaction. For example the equivalent >> support in Oracle that I am asking for is documented at >> http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96590/adga1_xa.htm >> > > When I wrote the patch for the backend support, I was not able to find > any open source implementations of X/Open XA-compatible resource > managers or transaction managers, which makes it kind of hard to > implement the API correctly. There was plenty of JDBC XA > implementations, however, so I used that for testing. > > If you can find something to test it with, it probably wouldn't be > that hard to write the library. >