Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 261D5B5DC29 for ; Mon, 3 Oct 2011 15:17:34 -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 87675-01-2 for ; Mon, 3 Oct 2011 18:17:27 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail.csc.lt (mail.csc.lt [193.138.191.5]) by mail.postgresql.org (Postfix) with ESMTP id 7C217B5DC3D for ; Mon, 3 Oct 2011 15:17:20 -0300 (ADT) Received: (qmail 3972 invoked by uid 210); 3 Oct 2011 18:17:19 -0000 Received: from mail.nsoft.lt by mail (envelope-from , uid 201) with qmail-scanner-2.05st (clamdscan: 0.97/13729. spamassassin: 3.2.1. perlscan: 2.05st. Clear:RC:1(77.240.249.53):. Processed in 0.01109 secs); 03 Oct 2011 18:17:19 -0000 Received: from mail.nsoft.lt (77.240.249.53) by mail.csc.lt with SMTP; 3 Oct 2011 18:17:19 -0000 Received: from [192.168.16.113] (unknown [77.240.249.53]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.nsoft.lt (Postfix) with ESMTPS id 7A2A68E353 for ; Mon, 3 Oct 2011 21:17:17 +0300 (EEST) Message-ID: <4E89FC2D.2050406@nsoft.lt> Date: Mon, 03 Oct 2011 21:17:17 +0300 From: Julius Tuskenis Organization: UAB nSoft User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: commiting transaction from outside References: <4E89E7BF.9040009@nsoft.lt> <4E89B12F02000025000419BD@gw.wicourts.gov> In-Reply-To: <4E89B12F02000025000419BD@gw.wicourts.gov> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/10 X-Sequence-Number: 38462 On 2011.10.03 20:57, Kevin Grittner wrote: > > > I can't think of any way to issue the commit, unless the application > is running in an unusual environment which lets you break in and > issue ad hoc commands on its connection. There is a way you could > fish out the effects of the transaction, although it might be a fair > bit of work. Each tuple inserted or updated has the transaction ID > set as its xmin in the new tuple, and every tuple deleted or updated > has the transaction ID set as its xmax. The old and new are > guaranteed not to go away until the transaction completes, one way > or the other. With some clever programming you could capture the > net effect of the transaction, and duplicate that effect after the > transaction is rolled back. > > Be aware that while the transaction is stuck "idle in transaction" > the cleanup of old tuples can't proceed normally; so if you're > continuing to modify any database in the cluster, it could be > accumulating bloat until you resolve this. > > -Kevin > Thank You, Kevin, Julien, Scott for the help. Scott - your idea is worth remembering. The problem is I can not see the tuples until they are committed, or can I ? And if I understand you correctly I can not rely on xmin and xmax values after the commit. Anyway Thank You for the Idea. I solved the problem by using sql injection methods (I was lucky the application was buggy enough). -- Julius Tuskenis Programavimo skyriaus vadovas UAB nSoft mob. +37068233050