PlanetScale

Database Transactions

Jan 14, 2026Ben Dicken
Database Transactions
SummaryAI, from the source post

This post elaborates on the fundamental concepts of database transactions, ACID compliance, and isolation levels, specifically detailing how Postgres and MySQL implement these features. It explains Postgres's multi-row versioning with `xmin` and `xmax` metadata and the `VACUUM FULL` command for space reclamation, contrasting it with MySQL's undo log approach for consistent reads. The post also defines and illustrates phantom reads, non-repeatable reads, and dirty reads in the context of different isolation levels, and briefly introduces row-level locking in MySQL for concurrent writes.

More from the Database Transactions trail