22 min read
Building a Concurrent Ledger in Postgres
You have a ledger table for all your customers' accounts. You want two transactions on the same account to serialize, but transactions on different accounts to run in parallel. This post describes a solution using an advisory lock keyed on the account id.
postgresqlsql developmenttransactions