Re: Blocking excessively in FOR UPDATE - Mailing list pgsql-performance
From | Claudio Freire |
---|---|
Subject | Re: Blocking excessively in FOR UPDATE |
Date | |
Msg-id | CAGTBQpYK6-ycWr0WXRwz39Bv30sCbDe68CC3MbhUp9-jwu_V=g@mail.gmail.com Whole thread Raw |
In response to | Re: Blocking excessively in FOR UPDATE (Claudio Freire <klaussfreire@gmail.com>) |
Responses |
Re: Blocking excessively in FOR UPDATE
(Tom Lane <tgl@sss.pgh.pa.us>)
|
List | pgsql-performance |
On Thu, Nov 3, 2011 at 4:29 PM, Claudio Freire <klaussfreire@gmail.com> wrote: > Next time I find it blocking, I will check pg_locks directly and post > the output. Here it is, two instances of the query, while blocked: select * from pg_locks where pid = 22636; locktype | database | relation | page | tuple | virtualxid | transactionid | classid | objid | objsubid | virtualtransaction | pid | mode | granted ---------------+----------+----------+------+-------+-------------+---------------+---------+-------+----------+--------------------+-------+------------------+--------- transactionid | | | | | | 360992199 | | | | 89/22579344 | 22636 | ExclusiveLock | t virtualxid | | | | | 89/22579344 | | | | | 89/22579344 | 22636 | ExclusiveLock | t relation | 16398 | 5552020 | | | | | | | | 89/22579344 | 22636 | AccessShareLock | t relation | 16398 | 5552020 | | | | | | | | 89/22579344 | 22636 | RowExclusiveLock | t relation | 16398 | 5552019 | | | | | | | | 89/22579344 | 22636 | AccessShareLock | t relation | 16398 | 5552019 | | | | | | | | 89/22579344 | 22636 | RowExclusiveLock | t relation | 16398 | 5525292 | | | | | | | | 89/22579344 | 22636 | RowShareLock | t relation | 16398 | 5525292 | | | | | | | | 89/22579344 | 22636 | RowExclusiveLock | t relation | 16398 | 5552008 | | | | | | | | 89/22579344 | 22636 | AccessShareLock | t relation | 16398 | 5552008 | | | | | | | | 89/22579344 | 22636 | RowExclusiveLock | t (10 rows) select * from pg_locks where pid = 22618; locktype | database | relation | page | tuple | virtualxid | transactionid | classid | objid | objsubid | virtualtransaction | pid | mode | granted ---------------+----------+----------+------+-------+-------------+---------------+---------+-------+----------+--------------------+-------+------------------+--------- virtualxid | | | | | 159/2706505 | | | | | 159/2706505 | 22618 | ExclusiveLock | t relation | 16398 | 5551986 | | | | | | | | 159/2706505 | 22618 | AccessShareLock | t transactionid | | | | | | 360992478 | | | | 159/2706505 | 22618 | ExclusiveLock | t relation | 16398 | 5552008 | | | | | | | | 159/2706505 | 22618 | AccessShareLock | t relation | 16398 | 5552008 | | | | | | | | 159/2706505 | 22618 | RowExclusiveLock | t relation | 16398 | 5526310 | | | | | | | | 159/2706505 | 22618 | RowShareLock | t relation | 16398 | 5552020 | | | | | | | | 159/2706505 | 22618 | AccessShareLock | t relation | 16398 | 5552020 | | | | | | | | 159/2706505 | 22618 | RowExclusiveLock | t relation | 16398 | 5526308 | | | | | | | | 159/2706505 | 22618 | AccessShareLock | t relation | 16398 | 5552019 | | | | | | | | 159/2706505 | 22618 | AccessShareLock | t relation | 16398 | 5552019 | | | | | | | | 159/2706505 | 22618 | RowExclusiveLock | t relation | 16398 | 5525296 | | | | | | | | 159/2706505 | 22618 | RowShareLock | t relation | 16398 | 5525292 | | | | | | | | 159/2706505 | 22618 | RowShareLock | t relation | 16398 | 5525292 | | | | | | | | 159/2706505 | 22618 | RowExclusiveLock | t (14 rows)
pgsql-performance by date: