Can multiple threads cause duplicate updates on constrained set?

Viewed 2960

In postgres if I run the following statement

update table set col = 1 where col = 2

In the default READ COMMITTED isolation level, from multiple concurrent sessions, am I guaranteed that:

  1. In a case of a single match only 1 thread will get a ROWCOUNT of 1 (meaning only one thread writes)
  2. In a case of a multi match that only 1 thread will get a ROWCOUNT > 0 (meaning only one thread writes the batch)
1 Answers
Related