Hacker News new | ask | show | jobs
by justinclift 257 days ago
How familiar are you with MVCC?

https://www.postgresql.org/docs/current/mvcc-intro.html

Asking because needing a lock for changing a row isn't the only approach that can be taken.

1 comments

Almost all commercial MVCC implementations (including Postgres) use row locks. Very few use OCC even though it's arguably a more natural fit for MVCC. Pessimistic locking is simply more robust over varied workloads.