A Practical Guide to Postgres Isolation Anomalies and How To Tame Them | Dan Svetlov’s blog
29-Mar-2025 43
Postgres is a powerful and versatile database management system, now ubiquitously used in all types of applications, most notably web services. In this context, its most important property is the ability to serve multitudes of users at the same time - with the help of an application server, of course. To maintain the balance between serving clients concurrently and preserving data consistency, the database has to make trade-offs, and Postgres is no different.
We will explore these trade-offs and examine what can go wrong when transactions from multiple users interweave. To do so, we will build a very rudimentary booking platform where users can reserve seats for arbitrary events. The system will be written in Ruby, and if you are allergic to that choice, fret not - there will be minimal Ruby code and a lot of SQL.
A Practical Guide to Postgres Isolation Anomalies and How To Tame Them | Dan Svetlov’s blog #ruby #rubydeveloper #rubyonrails #Practical #Guide #Postgres #Isolation #Anomalies #Svetlov’s #blog #guide https://rubyonrails.ba/link/a-practical-guide-to-postgres-isolation-anomalies-and-how-to-tame-them-dan-svetlov-s-blog