Isolation Levels
Cheat sheet · https://pcornel.dk/topic.php?topic=6173
Answer
Isolation levels (Read Uncommitted, Read Committed, Repeatable Read, Serializable, plus SQL Server Snapshot) decide which concurrency anomalies a transaction can see.
Remember
Defaults: PostgreSQL and SQL Server Read Committed, MySQL InnoDB Repeatable Read. Higher isolation means more retries or blocking — applications must retry serialization failures.
First checks
SHOW transaction_isolation;— first check for this topicpsql -c "SELECT now(), version();"— PostgreSQL reachable and versionmysql -e "SELECT NOW(), VERSION();"— MariaDB/MySQL reachable and versionsqlcmd -S <server> -Q "SELECT @@VERSION"— SQL Server reachable and version
Verify in this order
transaction starts with an isolation level → snapshot/locks → visible data
Where it usually breaks
Read-then-update without FOR UPDATE can lose updates under read committed.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6173