Skipping uncommitted inserts during deletes, updates, and inserts

delete and update queries behave the same way as scans do, with regard to uncommitted inserts. When the delete or update command encounters an uncommitted inserted row with the key value of interest, it skips it without blocking.

The only exception to this rule is if the transaction doing the uncommitted insert was overwriting an uncommitted delete of the same row done earlier by the same transaction. In this case, updates and deletes block on the uncommitted inserted row.

Insert queries, upon encountering an uncommitted inserted row with the same key value, raise a duplicate key error if the index is unique.