Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V3psX-0005Y4-0M for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Jul 2013 16:00:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V3psV-0004c6-Gw for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Jul 2013 16:00:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V3oIb-00015F-7y; Mon, 29 Jul 2013 14:19:45 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V3oIX-0006We-99; Mon, 29 Jul 2013 14:19:44 +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 r6TEJcN3024357 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 29 Jul 2013 10:19:38 -0400 Received: from [10.36.112.35] (ovpn-112-35.ams2.redhat.com [10.36.112.35]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r6TEJZDb020535; Mon, 29 Jul 2013 10:19:35 -0400 Message-ID: <51F679F6.4080504@redhat.com> Date: Mon, 29 Jul 2013 15:19:34 +0100 From: Tom Jenkinson 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: Ondrej Chaloupka , pgsql-general@postgresql.org, pgsql-bugs@postgresql.org, Pavel Raiskup Subject: Re: Incorrect response code after XA recovery References: <399053975.7952081.1375104824437.JavaMail.root@redhat.com> <25825.1375105824@sss.pgh.pa.us> In-Reply-To: <25825.1375105824@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Pg-Spam-Score: -8.4 (--------) 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 Hi Tom, A little bit of information in the linked bugzilla report is that the exception being returned has an XA error code of XAER_RMERR "An error occurred in rolling back the transaction branch. The resource manager is free to forget about the branch when returning this error so long as all accessing threads of control have been notified of the branch’s state." That does not sound right to me, wouldn't XAER_NOTA "The specified XID is not known by the resource manager" be more accurate? Thanks, Tom On 29/07/13 14:50, Tom Lane wrote: > Ondrej Chaloupka writes: >> The OTS specification requires both bottom up and top down recovery to be triggered by the recovering resource. This causes that two rollback calls are done against the DB. DB receives rollback call and does the rollback. Then for the second time it returns the exceptional code. As the DB already rollbacked the transaction and forgot about it the DB returns error that no such transaction exists. But this seems to be against OTS specification. > It's not likely that we would consider changing the behavior of ROLLBACK > PREPARED. The alternatives we would have are (1) silently accept a > ROLLBACK against a non-existent transaction ID, or (2) remember every > rolled-back ID forever. Neither seems sane in the least. > > It seems to me that this is something client-side code, probably the XA > manager, would need to deal with. The XA manager already has to track > uncommitted 2-phase transactions, and would furthermore have the best > idea of when it would be safe to forget about a rolled-back ID. > > Right offhand it appears to me that that Red Hat bug is filed against > the correct component, and you need to push them harder to fix their > bug/shortcoming rather than claim it's our problem. > > regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs