Home > OS >  serializable snapshot isolation and select for update
serializable snapshot isolation and select for update

Time:06-23

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?

CodePudding user response:

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.

  • Related