I would like to identify the user who has a specific table row locked from another user that initiates a SELECT … WHERE ROWID = … FOR UPDATE ON … NOWAIT for that same row. Is it possible to determine who has that lock in this case?
The purpose is to find out if a table row is locked before another tries to update that row. There will be no one waiting on the currently locked row.