This week I learned more than I'd ever thought I'd know about transaction isolation in Postgres
https://www.postgresql.org/docs/current/transaction-iso.html
@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.
@maxdeviant that sounds actually not too bad. were you debugging something?