Under what scenarios we use SERIALIZABLE Isolation level? I have seen some answers on website that says, when you want transaction to be completely isolated, we usually go for this.
What i would like to know from your own experience is that, when you've used this in your projects/or you've seen this to be used in other projects and what was the specific requirement that was not getting fulfilled by other isolation levels?
SERIALIZABLE
is useful when you build complex reports which require several queries.
In READ COMMITTED
or REPEATABLE READ
the queries could see the changes made between the transaction started and the moment they ran.
pg_dump
, the PostgreSQL
dump utility, starts it job with issuing SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
, to guarantee that the state of database being dumped would be that of the moment the utility was run, and the subsequent changes to the database could not interfere with the dump.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With