UmurInan
Transactions Topic

Transactions

Wrapping code in a transaction does not make it safe. These posts are about what transactions actually guarantee, what isolation levels really mean, why @Transactional is not magic, and which race conditions survive even inside a SERIALIZABLE block.

Backend

Posted on May 17, 2026

The Long Transaction That Ate Your Postgres

An idle transaction pins the xmin horizon. Autovacuum cannot reclaim anything newer than it. Tables bloat. Queries slow. Here is the fix every install needs.

Read more
Backend

Posted on May 15, 2026

Sagas Are Not Transactions

Sagas replace ACID transactions with compensation actions, not rollbacks. Intermediate states are visible to other services, and compensations can fail too.

Read more
Backend

Posted on May 1, 2026

Two Transactions Walk Into a Lock

Deadlocks are not exotic. They are predictable consequences of lock order. Here are the patterns, the fixes, and the eleven characters that ended one outage.

Read more
Backend

Posted on Apr 21, 2026

Database Isolation Levels Are a Contract, Not a Dial

Isolation levels define which anomalies you tolerate, not how much correctness you get. The SQL standard and what databases implement diverged decades ago.

Read more
Backend

Posted on Apr 12, 2026

@Transactional Is Not Magic

@Transactional looks simple until you hit self-invocation, wrong exception types, or silent failures on private methods. Here's what it actually does.

Read more
Backend

Posted on Apr 12, 2026

Transactions Don't Fix Race Conditions

Wrapping code in a transaction doesn't make concurrent operations safe. Here's what transactions guarantee and what race conditions they let slip through.

Read more
Backend

Posted on Apr 5, 2026

Distributed Transactions Are a Lie

Why two-phase commit fails in production distributed systems, and what engineers actually use instead: sagas, the outbox pattern, and eventual consistency.

Read more
Backend

Posted on Apr 12, 2026 intermediate

@Transactional Demystified: Every Attribute With Working Tests

Every @Transactional attribute explained with real working code: propagation, rollbackFor, readOnly, timeout, and isolation, each proved by a failing test.

Read more
Database

Posted on Apr 10, 2026 intermediate

Optimistic vs Pessimistic Locking in JPA

Two JPA strategies for preventing the lost update problem. @Version for optimistic locking, SELECT FOR UPDATE for pessimistic. Real SQL output, working tests.

Read more