On Wed, 2003-01-29 at 12:58, Garo Hussenjian wrote:
> I'm trying to track down a query in a web application that has postgresql in
> a deadlock.
By "deadlock", what exactly do you mean?
> Is there any way to view the query
> that is being run from knowing a process id?
You can use the pg_stat_activity view in PostgreSQL 7.2 and later -- see
the docs for more information:
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/monitoring-stats.html
Cheers,
Neil