Re:Postgres transactions are a distributed systems superpower
by pragmatic on Friday July 03, 2026 @10:12AM
(#48775311)
"One major trick in distributed systems is to always attempt things in the same order"
This is inportant in DBs in general to avoid deadlocks by two requests taking locks in different order.
But as someone who builds distributed systems, I can tell you that transactions should be local. Anytime you want to lock something across the network (eg Canisters in ICP) so you can read it, that’s probably a code smell. You probably want to have evented reactive things ripple out, you do need idempotency, but you shouldn’t design your system to read remote state if you can help it. Only subscribe to remote messages.