From mmusgrov@redhat.com Thu Apr 21 16:17:07 2011 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id B837F1337B82 for ; Thu, 21 Apr 2011 13:17:07 -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 79479-06 for ; Thu, 21 Apr 2011 16:17:00 +0000 (UTC) X-Greylist: delayed 00:47:01.392908 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 267471337B2F for ; Thu, 21 Apr 2011 13:16:59 -0300 (ADT) Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3LFTuhv023442 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 21 Apr 2011 11:29:56 -0400 Received: from [10.3.113.17] ([10.3.113.17]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p3LFTtPQ002471 for ; Thu, 21 Apr 2011 11:29:56 -0400 Message-ID: <4DB04E1D.6000301@redhat.com> Date: Thu, 21 Apr 2011 16:32:45 +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: pgsql-bugs@postgresql.org Subject: Re: BUG #5297: Add XATMI C API Content-Type: multipart/alternative; boundary="------------070400000609000407060306" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-5 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/173 X-Sequence-Number: 30092 This is a multi-part message in MIME format. --------------070400000609000407060306 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit The response to this issue says it is "Not a bug". Would it be possible for someone to provide an indication of how much effort is involved in providing XA support in the C API library (libpq)? --------------070400000609000407060306 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit The response to this issue says it is "Not a bug". Would it be possible for someone to provide an indication of how much effort is involved in providing XA support in the C API library (libpq)?

--------------070400000609000407060306-- From tgl@sss.pgh.pa.us Thu Apr 21 16:43:52 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id B07581337B83 for ; Thu, 21 Apr 2011 13:43:52 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 98913-04 for ; Thu, 21 Apr 2011 16:43:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 11BD11337B93 for ; Thu, 21 Apr 2011 13:43:44 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p3LGhi9J024818; Thu, 21 Apr 2011 12:43:44 -0400 (EDT) To: Michael Musgrove cc: pgsql-bugs@postgresql.org Subject: Re: BUG #5297: Add XATMI C API In-reply-to: <4DB04E1D.6000301@redhat.com> References: <4DB04E1D.6000301@redhat.com> Comments: In-reply-to Michael Musgrove message dated "Thu, 21 Apr 2011 16:32:45 +0100" Date: Thu, 21 Apr 2011 12:43:44 -0400 Message-ID: <24817.1303404224@sss.pgh.pa.us> From: Tom Lane 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/175 X-Sequence-Number: 30094 Michael Musgrove writes: > The response to this issue says it is "Not a bug". Would it be possible > for someone to provide an indication of how much effort is involved in > providing XA support in the C API library (libpq)? What do you consider to be "providing XA support"? XA requires there to be a transaction manager somewhere, which is not something libpq can provide since it's dependent on the good graces of its host application. Maybe there would be some value in teaching libpq to interact with an external XA manager, but what exactly do you think is required? regards, tom lane From mmusgrov@redhat.com Thu Apr 21 17:02:47 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id A5BB01337BA3 for ; Thu, 21 Apr 2011 14:02:47 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 38065-03 for ; Thu, 21 Apr 2011 17:02:37 +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 D75681337BDB for ; Thu, 21 Apr 2011 14:01:56 -0300 (ADT) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3LH1tDF020259 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Apr 2011 13:01:55 -0400 Received: from [10.3.113.17] ([10.3.113.17]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3LH1s54026337; Thu, 21 Apr 2011 13:01:54 -0400 Message-ID: <4DB063AB.1040800@redhat.com> Date: Thu, 21 Apr 2011 18:04:43 +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: Tom Lane CC: pgsql-bugs@postgresql.org Subject: Re: BUG #5297: Add XATMI C API References: <4DB04E1D.6000301@redhat.com> <24817.1303404224@sss.pgh.pa.us> In-Reply-To: <24817.1303404224@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 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/176 X-Sequence-Number: 30095 On 04/21/2011 05:43 PM, Tom Lane wrote: > Michael Musgrove writes: >> The response to this issue says it is "Not a bug". Would it be possible >> for someone to provide an indication of how much effort is involved in >> providing XA support in the C API library (libpq)? > What do you consider to be "providing XA support"? XA requires there to > be a transaction manager somewhere, which is not something libpq can > provide since it's dependent on the good graces of its host application. > Maybe there would be some value in teaching libpq to interact with an > external XA manager, but what exactly do you think is required? > > regards, tom lane 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 Thanks, Mike From heikki.linnakangas@enterprisedb.com Thu Apr 21 18:54:13 2011 Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 52A081337BEA for ; Thu, 21 Apr 2011 15:54:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 17285-03 for ; Thu, 21 Apr 2011 18:53:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og117.obsmtp.com (exprod7og117.obsmtp.com [64.18.2.6]) by mail.postgresql.org (Postfix) with ESMTP id E7AB81337B82 for ; Thu, 21 Apr 2011 15:53:54 -0300 (ADT) Received: from mail-ey0-f169.google.com ([209.85.215.169]) (using TLSv1) by exprod7ob117.postini.com ([64.18.6.12]) with SMTP ID DSNKTbB9QaEl++Ajkfmtp+jwnSihBiyu3wMS@postini.com; Thu, 21 Apr 2011 11:53:55 PDT Received: by eyd9 with SMTP id 9so8887eyd.14 for ; Thu, 21 Apr 2011 11:53:52 -0700 (PDT) Received: by 10.213.109.85 with SMTP id i21mr831388ebp.39.1303412030989; Thu, 21 Apr 2011 11:53:50 -0700 (PDT) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id k51sm1531715eei.17.2011.04.21.11.53.48 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Apr 2011 11:53:49 -0700 (PDT) Message-ID: <4DB07D3B.2010504@enterprisedb.com> Date: Thu, 21 Apr 2011 21:53:47 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.16) Gecko/20110307 Icedove/3.0.11 MIME-Version: 1.0 To: Michael Musgrove 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> In-Reply-To: <4DB063AB.1040800@redhat.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=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201104/177 X-Sequence-Number: 30096 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. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com From mmusgrov@redhat.com Tue Apr 26 09:58:24 2011 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. > From mmusgrov@redhat.com Tue Apr 26 11:01:03 2011 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id E0F241337B8B for ; Tue, 26 Apr 2011 08:01:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 37557-02 for ; Tue, 26 Apr 2011 11:00:57 +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 D869A1337B69 for ; Tue, 26 Apr 2011 08:00:55 -0300 (ADT) Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3QB0rmq019843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 26 Apr 2011 07:00:53 -0400 Received: from [10.3.113.107] (ovpn-113-107.phx2.redhat.com [10.3.113.107]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p3QB0pvu017704; Tue, 26 Apr 2011 07:00:52 -0400 Message-ID: <4DB6A690.4070804@redhat.com> Date: Tue, 26 Apr 2011 12:03:44 +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> <4DB697E1.1080506@redhat.com> In-Reply-To: <4DB697E1.1080506@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 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/198 X-Sequence-Number: 30117 Sorry, the link I included was for committers. Try this instead https://anonsvn.jboss.org/repos/blacktie/trunk/atmibroker-xatmi/src/example/txfooapp/ and the project page is http://www.jboss.org/blacktie > 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. >> >