Re: insert waits for delete with trigger

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

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'
order by l.pid;

After the above result, I went to OS
to get ps status.

Did I miss something?

Since the lock was granted to pid (18951), that
cause me confuse why OS ps shows it is waiting.

Also, I ntoiced that insert will be finished
almost immediately after delete is done.

Thanks,

--- Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Litao Wu <litaowu(at)yahoo(dot)com> 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 of
> broadcast)---------------------------
> TIP 7: don't forget to increase your free space map
> settings
>


__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2004-08-10 04:41:33 Re: insert waits for delete with trigger
Previous Message Tom Lane 2004-08-10 00:31:43 Re: insert waits for delete with trigger