zlacker

[return to "The part of Postgres we hate the most: Multi-version concurrency control"]
1. dale_g+sE[view] [source] 2023-04-26 20:25:34
>>andren+(OP)
That's interesting, MVCC was the thing that drew me to Postgres to begin with!

Way back I was working on an in-house inventory app written in Visual Basic against SQL Server 2000, I think. That one just put locks on tables. It had the "charming" characteristic of that if you weren't very, very careful with Enterprise Manager, loading a table in the GUI put a lock on it and just keep on holding it until that window was closed.

Then the running app would eventually snag on that lock, maybe keep holding some other lock that something else would snag on, and 5 minutes later I'd hear one of the operators screaming "Nothing is working! I can't take any orders!" from the room next to me.

◧◩
2. miohta+dG[view] [source] 2023-04-26 20:34:44
>>dale_g+sE
MVCC and optimistic concurrency control are very pleasant to work with for anyone who spent a decade with manually locking SQL databases. It takes the human error and developer mistakes away from the process, or protect against it. You can still slow down your queries with deadlocks, but at least you cannot corrupt your data by accident.

Though, any other optimistic concurrency control scheme can be better, but PostgreSQL was at the right place at the right time when people started to leave from MySQL.

[go to top]