Re: insert waits for delete with trigger - Mailing list pgsql-performance

From Tom Lane
Subject Re: insert waits for delete with trigger
Date
Msg-id 29338.1092156790@sss.pgh.pa.us
Whole thread Raw
In response to Re: insert waits for delete with trigger  (Litao Wu <litaowu@yahoo.com>)
List pgsql-performance
Litao Wu <litaowu@yahoo.com> 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 the transaction lock rows
(because they have NULLs in the relation field).

            regards, tom lane

pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: [HACKERS] fsync vs open_sync
Next
From: "Jason Coene"
Date:
Subject: Re: Hardware upgrade for a high-traffic database