Dan Ports <[email protected]> wrote:
> There's no urgent need to have this, although it's obviously more
> correct than the current behavior. It might be useful for
> debugging.
Agreed all around. For the benefit of the more casual follower of
the thread, attached is a simple example of the output. For the
SIReadLock rows, the pid column shows as empty without the patch.
-Kevin
test=# begin transaction isolation level serializable;
BEGIN
test=# select * from t where id = 500;
id
-----
500
(1 row)
test=# select * from pg_locks;
locktype | database | relation | page | tuple | virtualxid | transactionid |
classid | objid | objsubid | virtualtransaction | pid | mode |
granted
------------+----------+----------+------+-------+------------+---------------+---------+-------+----------+--------------------+-------+-----------------+---------
relation | 77659 | 110753 | | | | |
| | | 2/16258 | 13997 | AccessShareLock | t
relation | 77659 | 10998 | | | | |
| | | 2/16258 | 13997 | AccessShareLock | t
virtualxid | | | | | 2/16258 | |
| | | 2/16258 | 13997 | ExclusiveLock | t
relation | 77659 | 110756 | | | | |
| | | 2/16258 | 13997 | AccessShareLock | t
page | 77659 | 110756 | 2 | | | |
| | | 2/16258 | 13997 | SIReadLock | t
tuple | 77659 | 110753 | 1 | 245 | | |
| | | 2/16258 | 13997 | SIReadLock | t
(6 rows)
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers