Hal Davison wrote:
If a row of data has been locked FOR UPDATE, how can one determine WHO has
it locked?
I don't know think that you can easily tell who has it locked. The
pg_locks view gives the following:
relation | database | transaction | pid | mode | granted
----------+----------+-------------+------+-----------------+---------
| | 9313511 | 1347 | ExclusiveLock | t
18367616 | 17474206 | | 1351 | AccessShareLock | t
| | 9300513 | 1553 | ExclusiveLock | t
...
which gives you the pid, which you could use to see who it is.
hth
Ron