Compare

Side-by-side on the decisions that recur: index vs scan, normalize vs denormalize, optimistic vs pessimistic, partition vs shard, and more — with when to choose each.

Synchronous replicationAsynchronous replication
COMMIT returns whenthe replica has durably received (or applied) the WALthe primary has fsynced its own WAL
Commit latency+ one network round trip (and replica fsync)local only
Data loss on primary failurenone (for acknowledged commits)the lag window: everything past the replica's LSN
Stale reads on replicastill possible unless remote_applyyes, by the lag
Replica downwrites block (or fall back, if configured)primary unaffected; WAL accumulates
Choose this whenMoney, inventory, anything where an acknowledged write must survive the primary dying.Read scaling and geographic distribution where seconds of possible loss are acceptable and latency is not.