Re: How to see what SQL queries are associated with pg_locks?

From: Joshua Tolley <eggyknap(at)gmail(dot)com>
To: Aleksey Tsalolikhin <atsaloli(dot)tech(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to see what SQL queries are associated with pg_locks?
Date: 2010-10-04 13:31:05
Message-ID: 4ca9d71c.2765730a.2ca8.35f4@mx.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Oct 01, 2010 at 11:27:11AM -0700, Aleksey Tsalolikhin wrote:
> How to see what SQL queries are associated with pg_locks, please?

Look at the pid column in pg_locks. It will match the procpid column in
pg_stat_activity.

--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Derk Jan Horstman 2010-10-04 13:53:13 Error while compiling on HP-UX ia64
Previous Message Alexander Farber 2010-10-04 13:00:31 Re: Any advice on debugging hanging postgresql-8.1.21 (many postmaster's)