Re: insert waits for delete with trigger

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Litao Wu <litaowu(at)yahoo(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: insert waits for delete with trigger
Date: 2004-08-10 16:53:10
Message-ID: 29338.1092156790@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Litao Wu <litaowu(at)yahoo(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2004-08-10 17:18:32 Re: [HACKERS] fsync vs open_sync
Previous Message pgsql 2004-08-10 15:54:28 Re: [HACKERS] fsync vs open_sync