patch-ssi-pid-in-pg_locks.txt

text/plain

Filename: patch-ssi-pid-in-pg_locks.txt
Type: text/plain
Part: 0
Message: Re: trivial patch: show SIREAD pids in pg_locks
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)