pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julius Tuskenis <julius@nsoft.lt>
To: pgsql-admin@postgresql.org
Subject: Re: commiting transaction from outside
Date: Mon, 03 Oct 2011 21:17:17 +0300
Message-ID: <4E89FC2D.2050406@nsoft.lt> (raw)
In-Reply-To: <4E89B12F02000025000419BD@gw.wicourts.gov>
References: <4E89E7BF.9040009@nsoft.lt>
	<4E89B12F02000025000419BD@gw.wicourts.gov>

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




view thread (5+ messages)

Message-ID: <4E89FC2D.2050406@nsoft.lt>
Permalink:  ../4E89FC2D.2050406@nsoft.lt/
Also on:    postgresql.org/message-id/4E89FC2D.2050406@nsoft.lt

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: julius@nsoft.lt
  Subject: Re: commiting transaction from outside
  In-Reply-To: <4E89FC2D.2050406@nsoft.lt>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox