Git gave code cheap branching, rollback and merge. Data never got the same deal — because data is huge; one copy is a terabyte.

But a trend is changing that: the people editing data are turning into AI clusters. When the scale and frequency of writes go up an order of magnitude, branch / merge / rollback move from “nice feature” to “the only way this can be safe”.

1. What data versioning needs

Strip the product narrative and a data version system needs at least three things:

ComponentRole
RetentionKeep old versions alive — the real gate isn’t “can read old versions” but “do old versions still exist”
RegistryRemember which commit a snapshot is pinned to, durably across processes and crashes
Read at pinA path that reads at a given version instead of always reading latest

2. Implementing it on DuckDB

This series records implementing these primitives on DuckDB — from feasibility analysis, through snapshots, retention watermarks, branches, diff and merge, to moving the registry into internal tables for transactions and crash consistency.

Four posts:

  1. Feasibility: why an analytical database can grow version control
  2. Pinning history: snapshots, retention watermarks and AT SNAPSHOT
  3. Branches, diff, pick, merge
  4. Moving metadata into tables

3. One key realization

Before doing this I thought the hard part was “reading history”. After doing it, the hard parts turned out to be three lower-level things:

  • Retention: checkpoint reclaims old versions; pins must block it;
  • Transactions: metadata must go through the WAL too, or a crash loses it;
  • Identity: after a table is renamed, recreated or migrated, you still must tell whether it is the same table.

4. Three real scenarios

Scenario 1: bulk writes by agents An agent rewrites 400K rows every night. When it goes wrong you don’t need “restore a backup”; you need “go back to 2:17 last night” — that’s PITR, not backup.

Scenario 2: reproducible experiments Run three feature-engineering variants on the same data; results must map to which version was used. Branches are cheaper than copying files.

Scenario 3: undo a mistaken delete After a DELETE, the snapshot and clone still exist; recovery is just switching a reference — provided retention hasn’t dropped the old versions.

5. How it differs from Git

DimensionGitData versioning
Data sizeMBsGB–TB; can’t copy wholesale
Writeswhole-file replacementrow/column-level deltas
Concurrencymostly single writermultiple writers, long transactions
Retentionmanual gcretention watermark and quotas are mandatory
Mergeline-level diffneeds schema and semantics

So it isn’t “Git on a database” — it’s a different set of primitives designed for data scale.

4. An honest expectation

This is a research prototype, not a production system: it covers the core primitives (snapshots, branches, diff, merge, clone, PITR) but has no performance work and does not cover every edge case. The series marks what is measured and what is inferred.

Get the next essay

New essays on products, business and tech — plus what the experiment's numbers actually say.