All posts
Data Platform

Concurrent Transactions, Measured: Deadlocks, Lock Order and Conflicts in Postgres and DynamoDB

By

November 9, 2026

8 min read

Moving money between 10 accounts with 64 concurrent workers, Postgres committed 5 transfers a second when rows were locked in random order (50 deadlocks, median wait 24 s) and 1,185 a second when locked in a fixed order. DynamoDB committed 228 a second and cancelled 14,344. Also: hot counters, sharding, and serializable isolation.

Benchmark
Postgres Performance
DynamoDB
Transactions
Postgres, rows locked in random order5Postgres, rows locked lowest ID first1,185DynamoDB TransactWriteItems228

Committed transfers per second between 10 accounts, 64 concurrent workers, 10 seconds. Our measurements, November 2026. Log scale.

The data
Committed per second
Postgres, rows locked in random order5
Postgres, rows locked lowest ID first1,185
DynamoDB TransactWriteItems228

One line of code, the order in which a transaction locks two rows, made a 237-fold difference. The full report has the same test at 10,000 accounts, a single hot counter with 64 writers, the counter sharded ten ways, and serializable against read committed isolation.

Contention or deadlocks in production?

We'll read your locking pattern with you and point at the fix. 30 minutes, free.

hoolco Monthly Review

Once a month: what changed in tech that month and what it means for you, from cloud and AI to security and the tools you build with. Every item links to its source. No sales pitch, unsubscribe in one click.

As of November 9, 2026. Provided as is, for general information, and accurate to the best of our knowledge on the date shown. Not legal, compliance, tax, financial or other professional advice. Prices, limits and vendor services change; check current vendor documentation before relying on anything here. Terms of use.