WHo is locking me?

From: "Abraham, Danny" <danny_abraham(at)bmc(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Cc: "Abraham, Danny" <danny_abraham(at)bmc(dot)com>
Subject: WHo is locking me?
Date: 2010-03-18 19:02:10
Message-ID: 2C0926ABD16BB641A8E2F11A54920042142DE2F599@PHXCCRPRD01.adprod.bmc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

A process hangs forever.
When using this query...

SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
pg_stat_get_backend_activity(s.backendid) AS current_query
FROM (SELECT pg_stat_get_backend_idset() AS backendid) AS s
where pg_stat_get_backend_activity(s.backendid) not like '<insuff%'
and pg_stat_get_backend_activity(s.backendid) not like '<IDLE>';

I get...

procpid | current_query
---------+---------------------------------------------------------------------
26702 | SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
: pg_stat_get_backend_activity(s.backendid) AS current_query
: FROM (SELECT pg_stat_get_backend_idset() AS backendid) AS s
: where pg_stat_get_backend_activity(s.backendid) not like '<insuff%'
: and pg_stat_get_backend_activity(s.backendid) not like '<IDLE>';
21282 | update cmr_lastno set lastisn=lastisn+1 where tablename='DANNY';
25936 | <IDLE> in transaction <== This is the locker

And the question:
- What exactly is the locker doing?
- Can I retrieve the Client PID somewhere (then by process name I will dive into the code).

Thanks a lot

Danny Abraham
BMC Software
CTM&D Business Unit
972-52-4286-513
danny_abraham(at)bmc(dot)com

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Iñigo Martinez Lasala 2010-03-18 19:39:48 Re: Missing tsearch2 functions
Previous Message Tom Lane 2010-03-18 16:46:46 Re: Missing tsearch2 functions