Skip site navigation (1) Skip section navigation (2)

Re: finding the procpid (or pid) for a prepared transaction

From: CS DBA <cs_dba(at)consistentstate(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: finding the procpid (or pid) for a prepared transaction
Date: 2011-02-18 02:51:40
Message-ID: 4D5DDEBC.7090508@consistentstate.com (view raw or flat)
Thread:
Lists: pgsql-admin
On 02/17/2011 07:48 PM, CS DBA wrote:
> On 02/17/2011 07:19 PM, Tom Lane wrote:
>> CS DBA<cs_dba(at)consistentstate(dot)com>  writes:
>>> I have several prepared tx which are running for a long long time. I
>>> want to kill 'em but I dont know the process id.
>> If they're prepared, they're *not* running, and they don't have a
>> process id.  They're just going to sit there until you do COMMIT
>> PREPARED or ROLLBACK PREPARED.
>>
>>             regards, tom lane
>
> aah, makes sense Thanks.
>
> So, for future reference.. if I prepare a tx, and then execute the 
> prepared stmt, is there a way to associate the xid from a prepared txn 
> (pg_prepared_xacts) with the row in pg_stat_activity showing the 
> executing prepared stmt (within the current prepared txn)?  or is 
> there a way to see the text of a currently prepared txn so I can look 
> for the statement being executed in pg_stat_activity?
>
>
>


nevermind.... sorry I'm confusing prepared txn's with prepared stmts.


-- 
---------------------------------------------
Kevin Kempter       -       Constent State
A PostgreSQL Professional Services Company
           www.consistentstate.com
---------------------------------------------


In response to

pgsql-admin by date

Next:From: Dean Gibson (DB Administrator)Date: 2011-02-18 03:55:07
Subject: Re: Trigger File Behaviour
Previous:From: CS DBADate: 2011-02-18 02:48:30
Subject: Re: finding the procpid (or pid) for a prepared transaction

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group