Turso Database Fundamentals Sync
Conflict Resolution
How Turso sync handles concurrent changes from multiple clients.
NOTE
This particular usage uses the Turso Cloud to sync the local Turso databases and assumes that you have an account.
Last Push Wins
Turso sync uses a last push wins strategy. When two clients modify the same data and push, the last push determines the final state on the remote.
| Time | Client A | Client B |
|---|---|---|
| T1 | UPDATE users SET name='Alice' WHERE id=1 |
|
| T2 | UPDATE users SET name='Bob' WHERE id=1 |
|
| T3 | push() |
|
| T4 | push() |
Result: The name is 'Bob' because Client B pushed last.
What Happens During Pull
When you pull and have unpushed local changes:
- Your local database is rolled back to the last synced state
- Remote changes are applied
- Your unpushed local changes are replayed on top
This rollback-and-replay happens atomically — if anything fails, your database remains in its previous state.
Synced from official Turso documentation (
tursodatabase/turso-docs
· MIT License)
Official Docs ↗