Could someone tell me what Postgres does when a row is inserted into a table with a unique constraint on a column?
Conversation
Replying to
lookup existing item in the associated unique index in a non-transactional fashion, error out when found
1
Replying to
transaction will block on other transaction not yet committed/aborted that already inserted same value.
Replying to
After blocking, txn can then know if other one committed (i.e it needs to abort) or aborted (txn succeeds).


