Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V6MEc-0002Yy-GC for pgsql-bugs@arkaria.postgresql.org; Mon, 05 Aug 2013 14:58:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V6MEc-0002gK-05 for pgsql-bugs@arkaria.postgresql.org; Mon, 05 Aug 2013 14:58:10 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V6MEb-0002gC-8o for pgsql-bugs@postgresql.org; Mon, 05 Aug 2013 14:58:09 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V6MEX-00044w-8g for pgsql-bugs@postgresql.org; Mon, 05 Aug 2013 14:58:08 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r75Ew3LE007734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 5 Aug 2013 10:58:03 -0400 Received: from [10.32.224.187] (dhcp-1-187.lcy.redhat.com [10.32.224.187]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r75Ew1kX011783; Mon, 5 Aug 2013 10:58:02 -0400 Message-ID: <51FFBD79.1060107@redhat.com> Date: Mon, 05 Aug 2013 15:58:01 +0100 From: Jeremy Whiting User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Tom Lane CC: Tom Jenkinson , Ondrej Chaloupka , pgsql-bugs@postgresql.org, Pavel Raiskup Subject: Re: [JDBC] Incorrect response code after XA recovery References: <399053975.7952081.1375104824437.JavaMail.root@redhat.com> <25825.1375105824@sss.pgh.pa.us> <51F679F6.4080504@redhat.com> <26246.1375109172@sss.pgh.pa.us> <51F682DF.9020806@redhat.com> <26470.1375110681@sss.pgh.pa.us> <51F8F6D3.30500@redhat.com> In-Reply-To: <51F8F6D3.30500@redhat.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.25 X-Pg-Spam-Score: -5.0 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hello Tom, A quick update on progress. A second PR was created to provide a patch. https://github.com/pgjdbc/pgjdbc/pull/76 Regards, Jeremy On 31/07/13 12:36, Jeremy Whiting wrote: > Hi Tom, > The driver currently doesn't report back to the calling client (tm) > XAException.XAER_NOTA code as Ondrej and Tom Jenkinson have identified. > Instead it returns XAException.XAER_RMERR. See line 416 > > https://github.com/pgjdbc/pgjdbc/blob/master/org/postgresql/xa/PGXAConnection.java#416 > > which imo is used for general errors in the resource manager. > > I've written a test case that can be pulled into the pgjdbc testsuite > that will make verifying this error easier. It is based on the example > code Tom Jenkinson provided. A pull request has been created which can > be found here... > > https://github.com/pgjdbc/pgjdbc/pull/73 > > I am currently coding up a change to the driver in anticipation there > is agreement in the pgjdbc group to change the rollback method. Another > pull request will be created for that. Let's see what discussion and > decision is made by the more active members in pgjdbc. > > Regards, > Jeremy > > On 29/07/13 16:11, Tom Lane wrote: >> Tom Jenkinson writes: >>> On Mon 29 Jul 2013 15:46:12 BST, Tom Lane wrote: >>>> No idea, but in any case that's outside Postgres' purview. It's barely >>>> possible that the Postgres JDBC driver has something to do with that, >>>> but it sounds more like the XA manager's turf. >>> I am not sure what you mean here as I don't know the structure of how >>> the PostGres project is packaged, all I know is that the PostGres JDBC >>> driver component appears to be returning an XAException with the >>> message "Error rolling back prepared transaction" and an errorCode of >>> XAException.XAER_RMERR rather than XAER_NOTA. >>> Is there a different component within your bug tracking system we >>> should be using to raise this against the JDBC driver instead? >> The folk who would fix anything in the JDBC driver tend to read >> pgsql-jdbc sooner than pgsql-bugs, so cc'ing there for comment. >> >> regards, tom lane >> >> > -- Jeremy Whiting Senior Software Engineer, Performance Team Red Hat ------------------------------------------------------------ Registered Address: Red Hat UK Ltd, 64 Baker Street, 4th Floor, London. W1U 7DF. United Kingdom. Registered in England and Wales under Company Registration No. 03798903. Directors: Michael Cunningham (USA), Mark Hegarty (Ireland), Matt Parson (USA), Charlie Peters (USA) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs