Re: [PERFORM] insert waits for delete with trigger

2004-08-10 Thread Tom Lane
Litao Wu <[EMAIL PROTECTED]> writes: > How about: > select c.relname, l.pid, l.mode, l.granted, > a.current_query > from pg_locks l, pg_class c, pg_stat_activity a > where > l.relation = c.oid > AND l.pid = a.procpid > order by l.granted, l.pid; You can't join to pg_class without eliminating

Re: [PERFORM] insert waits for delete with trigger

2004-08-10 Thread Litao Wu
Thank you. How about: select c.relname, l.pid, l.mode, l.granted, a.current_query from pg_locks l, pg_class c, pg_stat_activity a where l.relation = c.oid AND l.pid = a.procpid order by l.granted, l.pid; relname | pid | mode | granted |

Re: [PERFORM] insert waits for delete with trigger

2004-08-09 Thread Tom Lane
Litao Wu <[EMAIL PROTECTED]> writes: > Did I miss something? Your join omits all transaction locks. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [PERFORM] insert waits for delete with trigger

2004-08-09 Thread Litao Wu
Hi Tom, No row has granted='f'. The result shown in the original email is from: select c.relname, l.pid, l.mode, l.granted, current_query from pg_locks l, pg_class c, pg_stat_activity a where relation is not null AND l.relation = c.oid AND l.pid = a.procpid AND l.mode != 'AccessShareLock' o

Re: [PERFORM] insert waits for delete with trigger

2004-08-09 Thread Tom Lane
Litao Wu <[EMAIL PROTECTED]> writes: > Here is info from pg_lock: All those locks are already granted, so they are not much help in understanding what PID 18951 is waiting for. What row does it have with granted = 'f' ? regards, tom lane ---(end o