Transaction commit logic can be expressed as a SQL view over an `intents` table, moving transaction resolution from the control plane to the data plane. Using recursive SQL (WITH MUTUALLY RECURSIVE), transactions are resolved by iteratively determining which must roll back based on read/write set conflicts. Incremental view maintenance (IVM) in Materialize keeps this view continuously updated, enabling interactive query latency (~15-30ms). The post walks through the full implementation: schema design, the recursive rollback view, asynchronous garbage collection (removing failed transactions, stale read sets, and overwritten writes), and query optimization using indexes and EXPLAIN. The approach trades some expressivity for higher throughput by offloading conflict resolution to the scalable data plane rather than centralized control-plane locking.

30m read timeFrom materialize.com
Post cover image
Table of contents
Database TransactionsA Running Example: Banks and StuffRead Sets and Write SetsSome example transactionsCommitted .. but to Where?Resolving TransactionsConvergence and TerminationAsynchronous MaintenanceImplementation and EvaluationConclusionsAppendix: Setup SQLAppendix: A session of improvements (2026-06-12)
203 Impressions