pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: CS DBA <cs_dba@consistentstate.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: finding the procpid (or pid) for a prepared transaction
Date: Thu, 17 Feb 2011 19:48:30 -0700
Message-ID: <4D5DDDFE.4000807@consistentstate.com> (raw)
In-Reply-To: <18661.1297995564@sss.pgh.pa.us>
References: <4D5DD51C.30600@consistentstate.com>
	<18661.1297995564@sss.pgh.pa.us>

On 02/17/2011 07:19 PM, Tom Lane wrote:
> CS DBA<cs_dba@consistentstate.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?






view thread (4+ messages)  latest in thread

Message-ID: <4D5DDDFE.4000807@consistentstate.com>
Permalink:  ../4D5DDDFE.4000807@consistentstate.com/
Also on:    postgresql.org/message-id/4D5DDDFE.4000807@consistentstate.com

 · 

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: cs_dba@consistentstate.com, tgl@sss.pgh.pa.us
  Subject: Re: finding the procpid (or pid) for a prepared transaction
  In-Reply-To: <4D5DDDFE.4000807@consistentstate.com>

* 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