可序列化快照隔离并选择更新
我刚刚读过 serializable的快照隔离本身可以防止所谓的编写偏斜
。
问题:当我在阅读后要进行更新时,对DB进行标记时,对于DB仍然有意义吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这是有意义的。通过使用
进行更新
,您可以防止某些序列化错误发生(因为您是明确的序列化操作),如果冲突频繁,这将提高性能。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.