Re: Hung SQL Update Linux Redhat 4U5 Postgres 8.3.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig Vosburgh <craig(dot)vosburgh(at)cassatt(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Hung SQL Update Linux Redhat 4U5 Postgres 8.3.1
Date: 2008-05-12 22:49:31
Message-ID: 28655.1210632571@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Craig Vosburgh <craig(dot)vosburgh(at)cassatt(dot)com> writes:
> As for which process owns that lock, I'm not sure how to find that out
> (sorry newbie). I can find the PID that is waiting for that lock and I can
> find the table/row that appears to be waiting for the lock to perform the
> action but I can't figure out which process actually owns the lock that is
> causing the issue.

It's whichever one actually holds that same lock according to pg_locks
(ie, there's an entry that matches on locktype and transactionid but
has granted = 't'; then join the pid of that entry against
pg_stat_activity).

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message D Galen 2008-05-12 22:53:35 Server not listening
Previous Message Justin 2008-05-12 22:37:02 Re: rounding problems