News for hackers. Stuff that matters.
Re:My Favorite PostgreSQL Queries and Why They Matter by borplk on Sunday April 15, 2018 @03:47AM (#16841748)
I suggest people use "serializable" by default and relax it carefully on a as-needed basis.
Re:My Favorite PostgreSQL Queries and Why They Matter by stubish on Thursday April 19, 2018 @08:49PM (#16881358)
I suggest read committed, and increase it to serializable only if necessary. serializable transaction isolation means your code is responsible for catching the serialization exceptions that will occur and handling them (retrying the transaction, generally). Devs just don't do that, and don't even know how to trigger the exceptions in most case. So you end up with apps that work fine during CI and staging, but start failing under load. And it might not be possible to retrofit the correct exception handling without a massive re-architecture.
Re:My Favorite PostgreSQL Queries and Why They Matter by malisper on Sunday April 15, 2018 @01:42PM (#16843794)
That's reasonable. I usually avoid the higher isolation levels because they can cause queries to spontaneously fail. You need to be able to put in the extra work for handling the cases where they fail.

If data correctness is an absolute must, you should go with serializable.