The SELECT FOR NO KEY UPDATE command acquires RowShareLock table lock and a FORNOKEYUPDATE row lock. Following are the locks SELECT FOR NO KEY UPDATE acquires, the commands that are allowed to run concurrently with its lock RowShareLock and the commands that conflict with it. The list also includes the conflicting row locks if applicable
Commands concurrently allowed on the table with SELECT FOR NO KEY UPDATE
e.g. If tx1 does a SELECT FOR NO KEY UPDATE on the table then tx2 is allowed to do any of the following commands concurrently on the same table without being blocked. Some DMLs executed on the same rows may block, read more below.
From the above commands, only the following are allowed to execute concurrently on the same row with SELECT FOR NO KEY UPDATE without conflicting.
e.g. If tx1 executes a SELECT FOR NO KEY UPDATE on a row then concurrently tx2 is allowed to execute any of the following commands even on the same row .
Commands conflicting with SELECT FOR NO KEY UPDATE on the table
e.g. If tx1 does a SELECT FOR NO KEY UPDATE on the table then concurrently tx2 tries to do any of the following commands on the same table, tx2 will be blocked. Conversely, if tx1 executes any of the following commands and then tx2 concurrently tries to execute SELECT FOR NO KEY UPDATE, tx2 will block.