This week I learned more than I'd ever thought I'd know about transaction isolation in Postgres

· · Web · 1 · 0 · 0

@maxdeviant that sounds actually not too bad. were you debugging something?

@metasyn I was trying to figure out how to maintain an atomic counter column.

I initially started out using Serializable isolation, but after a lot of debugging it turned out that what I actually wanted was Repeatable Read isolation.

Turns out, Serializable isolation performs page-level locking, so you can run into scenarios where concurrent updates to different rows in a table can fail if they are on the same page.

Sign in to participate in the conversation

Revel in the marvels of the universe. We are a collective of forward-thinking individuals who strive to better ourselves and our surroundings through constant creation. We express ourselves through music, art, games, and writing. We also put great value in play. A warm welcome to any like-minded people who feel these ideals resonate with them.