← Back home

Why Aurora PostgreSQL

Two people, one ledger, the same instant

A shared ledger has a correctness invariant that eventual consistency cannot hold: every expense must be durably recorded and balances must stay zero-sum. When two members write at once, Aurora's snapshot isolation aborts the loser with SQLSTATE 40001 instead of silently losing the update. Run the same race with and without LedgerLoop's bounded OCC retry and compare the outcomes.

Ada writes a $60 expense and Grace writes a $40 expense at the same instant, into the same group ledger.