Reputation: 11251
I just have read serializable snapshot isolation in PostgresQL and understood from it that using this isolation level DB by itself preventing so called writing skew
.
The question: is it still meaningful for DB when I mark reads with FOR UPDATE
sql postfix when it's going to be update after read?
Upvotes: 1
Views: 260
Reputation: 246483
Yes, it is meaningful. By using FOR UPDATE
, you can prevent some serialization errors from happening (because you are explicitly serializing operations), which will improve performance if conflicts are frequent.
Upvotes: 1