<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <!-- Source: https://www.dolthub.com/blog/rss.xml -->
  <channel>
    <title>DoltHub Blog - Latest Posts</title>
    <description>Blog for DoltHub, a website hosting databases made with Dolt, an open-source version-controlled SQL database with Git-like semantics.</description>
    <link>https://siftrss.com/f/mXdZRnKVAYR</link>
    <language>en-us</language>
    <lastBuildDate>Thu, 19 Nov 2026 18:39:01 GMT</lastBuildDate>
    <atom:link href="https://siftrss.com/f/mXdZRnKVAYR" rel="self" type="application/rss+xml"/>
    <item>
      <title>Lazy Flush</title>
      <link>https://dolthub.com/blog/2026-11-13-lazy-flush/</link>
      <guid isPermaLink="true">https://dolthub.com/blog/2026-11-13-lazy-flush/</guid>
      <description>Lazy Flush defer materialization of tables for a gain 25% in TPC-C.</description>
      <pubDate>Fri, 13 Nov 2026 00:00:00 GMT</pubDate>
      <content:encoded>&lt;p&gt;Dolt is the world’s first version-controlled database aimed as a drop-in replacement for MySQL.
Over the years, we’ve made huge improvements to our performance metrics, even surpassing MySQL in many benchmarks.
However, &lt;a href="https://www.tpc.org/tpcc/"&gt;TPC-C&lt;/a&gt; is one where there is still a somewhat large performance disparity between Dolt and MySQL.
Today, we bring you Lazy Flush, an improvement to our materialization logic that gives a &lt;code&gt;~25%&lt;/code&gt; increase in Transactions Per Second (TPS).&lt;/p&gt;
&lt;h1 id="the-problem"&gt;The Problem&lt;a class="anchor-link" aria-label="Link to heading" href="#the-problem"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;TPC-C is an industry standard performance benchmark for OLTP databases that attempts to simulate real-world usage of an OLTP database.
The benchmark will randomly select from a few different transaction types that each read and write to various tables.
Each transaction will &lt;code&gt;BEGIN&lt;/code&gt; a transaction, run a few reads (&lt;code&gt;SELECT&lt;/code&gt; statements) and writes (&lt;code&gt;INSERT&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt; statements), and lastly &lt;code&gt;COMMIT&lt;/code&gt; the results.
If you’d like to learn more about the details of TPC-C, you can read this &lt;a href="https://www.dolthub.com/blog/2026-05-14-how-tpcc-works/"&gt;blog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Within a transaction, modifications to tables are visible to readers/writers within that same transaction and are not persisted until &lt;code&gt;COMMIT&lt;/code&gt; (or discarded on &lt;code&gt;ROLLBACK&lt;/code&gt;).
Dolt handles this by reading from the current RootValue and always immediately materializing the results to a new RootValue.
This solution is nice because it is relatively simple; we can always rely on the current RootValue to have the most up-to-date version of the table.
The problem is that the cost of materializing every edit to a new RootValue every time can add up, especially when there are multiple edits that may be discarded.&lt;/p&gt;
&lt;h1 id="the-solution"&gt;The Solution&lt;a class="anchor-link" aria-label="Link to heading" href="#the-solution"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The solution is to just not do that; we don’t need to materialize the edits every time.
Table writers already put changes in a MutableMap, which is an in-memory skiplist representation of the table.
It is entirely possible to leave the edits in the skiplist and continue to read/write from that MutableMap until we commit the transaction.
Essentially, we are delaying flushing the edits from the current transaction to the RootValue until it is necessary, and we rely on the MutableMap stored within the writers as our most up-to-date table.
We call this Lazy Flush.&lt;/p&gt;
&lt;h1 id="performance-improvements"&gt;Performance Improvements&lt;a class="anchor-link" aria-label="Link to heading" href="#performance-improvements"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;With Lazy Flush, we’re seeing TPS increase from &lt;code&gt;56.93&lt;/code&gt; to &lt;code&gt;71.37&lt;/code&gt;; that’s a &lt;code&gt;25.36%&lt;/code&gt; more transactions every second!
For reference, MySQL can do &lt;code&gt;96.79&lt;/code&gt; TPS, so we’re unfortunately still &lt;code&gt;1.36x&lt;/code&gt; slower than MySQL.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://static.dolthub.com/blogimages/lazy_flush_tps.png/6f04d2bb140593ce2e57df98f104dd065b5479b60c7aa8123e34b37125fd54d3.webp" alt="Lazy Flush TPS"&gt;&lt;/p&gt;
&lt;p&gt;Additionally, we’re seeing a performance win in our Sysbench write benchmarks.
There’s a &lt;code&gt;8.58%&lt;/code&gt; improvement in &lt;code&gt;oltp_read_write&lt;/code&gt; and &lt;code&gt;16.5%&lt;/code&gt; in &lt;code&gt;oltp_write_only&lt;/code&gt;.
As a result, every write benchmark is faster than MySQL…except for &lt;code&gt;oltp_read_write&lt;/code&gt;, which is about &lt;code&gt;5%&lt;/code&gt; slower.
The updated full benchmarks are available on our &lt;a href="https://www.dolthub.com/docs/sql-reference/benchmarks/latency/"&gt;docs&lt;/a&gt;.&lt;/p&gt;
&lt;h1 id="conclusion"&gt;Conclusion&lt;a class="anchor-link" aria-label="Link to heading" href="#conclusion"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The Dolt performance journey continues as we continue to close to gap on MySQL benchmarks.
If you find any performance issues with Dolt, feel free to report it on &lt;a href="https://www.github.com/dolthub/dolt/issues"&gt;Github Issues&lt;/a&gt; or discuss with a team member on &lt;a href="https://discord.gg/gqr7K4VNKe"&gt;our Discord&lt;/a&gt;.&lt;/p&gt;</content:encoded>
      <dc:creator>James Cor</dc:creator>
      <category>technical</category>
      <category>performance</category>
    </item>
    <item>
      <title>Dolt now supports committing to multiple branches in one transaction</title>
      <link>https://dolthub.com/blog/2026-10-21-multi-branch-commit/</link>
      <guid isPermaLink="true">https://dolthub.com/blog/2026-10-21-multi-branch-commit/</guid>
      <description>Dolt 2.5.0 supports atomic transactions and version-controlled commits across multiple branches.</description>
      <pubDate>Wed, 21 Oct 2026 00:00:00 GMT</pubDate>
      <content:encoded>&lt;p&gt;We’re writing &lt;a href="https://doltdb.com"&gt;Dolt&lt;/a&gt;, the world’s first and only SQL database that you can
branch and merge, push and pull, diff and clone, just like a Git repository. Dolt started its life
as a command-line tool for running version control commands on databases, and we modeled &lt;a href="https://www.dolthub.com/docs/cli-reference/cli/"&gt;those
commands&lt;/a&gt; on Git’s own interface so our customers
wouldn’t have to learn a new tool. The idea was that any command like &lt;code&gt;git checkout&lt;/code&gt; or &lt;code&gt;git merge&lt;/code&gt;
should work the same in Dolt, so &lt;code&gt;dolt checkout&lt;/code&gt; and &lt;code&gt;dolt merge&lt;/code&gt; do the same thing as their Git
counterparts, working on database tables instead of files. Whenever we had a design question about
how the product should work, our default guiding principle was always “make it work the same way Git
does.”&lt;/p&gt;
&lt;p&gt;Now Dolt is an OLTP database, and the primary way people use the version control features is through
&lt;a href="https://www.dolthub.com/docs/sql-reference/version-control/dolt-sql-procedures/"&gt;procedures&lt;/a&gt;
and &lt;a href="https://www.dolthub.com/docs/sql-reference/version-control/dolt-system-tables/"&gt;system
tables&lt;/a&gt;. These
features are also designed with the north star of “What does Git do?”, but there are a couple of
distinct areas where we had to innovate because Git could offer no guidance. In particular, Git is
fundamentally single-player in each clone, with a single branch checked out into a shared working set,
whereas Dolt has to accommodate multiple users editing the same or different branch heads
concurrently. On top of that, as a SQL database, Dolt has to conform to different standards and
expectations about transactions and durability. So we had to invent our own &lt;a href="https://www.dolthub.com/docs/sql-reference/version-control/branches/"&gt;transaction and session
management model&lt;/a&gt; to bridge
the two domains.&lt;/p&gt;
&lt;p&gt;One area where Git could offer no guidance was what to do when more than one branch has edits and
the user tries to commit them. This situation is simply not possible in Git, and our early storage
library interfaces made the same assumption as Git, that only a single branch would be updated in
one atomic write. So we made the conservative choice and made multi-branch commits illegal. Prior to
Dolt 2.5.0, a transaction that wrote to multiple different branches would see an error on &lt;code&gt;COMMIT&lt;/code&gt;
or &lt;code&gt;CALL DOLT_COMMIT()&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; COMMIT&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;ERROR &lt;/span&gt;&lt;span&gt;1105&lt;/span&gt;&lt;span&gt; (HY000): Cannot &lt;/span&gt;&lt;span&gt;commit&lt;/span&gt;&lt;span&gt; changes&lt;/span&gt;&lt;span&gt; on&lt;/span&gt;&lt;span&gt; more than one branch &lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span&gt; database&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Today, we’re excited to announce the first major change to this model since we invented it over 5
years ago. It’s now possible to write to multiple branches in the same atomic SQL transaction. This
capability is out now, in Dolt 2.5.0.&lt;/p&gt;
&lt;h1 id="demo"&gt;Demo&lt;a class="anchor-link" aria-label="Link to heading" href="#demo"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;For this demo, we’ll be using a simple database called &lt;code&gt;demo&lt;/code&gt; with a &lt;code&gt;notes&lt;/code&gt; table. It has a &lt;code&gt;main&lt;/code&gt;
branch and a &lt;code&gt;feature&lt;/code&gt; branch.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;CREATE&lt;/span&gt;&lt;span&gt; DATABASE&lt;/span&gt;&lt;span&gt; demo&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;USE&lt;/span&gt;&lt;span&gt; demo;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;CREATE&lt;/span&gt;&lt;span&gt; TABLE&lt;/span&gt;&lt;span&gt; notes&lt;/span&gt;&lt;span&gt; (id &lt;/span&gt;&lt;span&gt;INT&lt;/span&gt;&lt;span&gt; PRIMARY KEY&lt;/span&gt;&lt;span&gt;, note &lt;/span&gt;&lt;span&gt;VARCHAR&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;40&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;CALL&lt;/span&gt;&lt;span&gt; dolt_commit(&lt;/span&gt;&lt;span&gt;'-Am'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Create notes table'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;CALL&lt;/span&gt;&lt;span&gt; dolt_branch(&lt;/span&gt;&lt;span&gt;'feature'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In Dolt 2.5.0 and later, you can write to two different branches in the same transaction and commit
both together atomically.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; START TRANSACTION&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; INSERT INTO&lt;/span&gt;&lt;span&gt; notes &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'written on main'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; CALL&lt;/span&gt;&lt;span&gt; dolt_checkout(&lt;/span&gt;&lt;span&gt;'feature'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;--------+------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt; | &lt;/span&gt;&lt;span&gt;message&lt;/span&gt;&lt;span&gt;                      |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;--------+------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;|      &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; | Switched &lt;/span&gt;&lt;span&gt;to&lt;/span&gt;&lt;span&gt; branch &lt;/span&gt;&lt;span&gt;'feature'&lt;/span&gt;&lt;span&gt; |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;--------+------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; INSERT INTO&lt;/span&gt;&lt;span&gt; notes &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'written on feature'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; COMMIT&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/main`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;ORDER BY&lt;/span&gt;&lt;span&gt; id;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| id | note            |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;|  &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; | written &lt;/span&gt;&lt;span&gt;on&lt;/span&gt;&lt;span&gt; main |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/feature`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;ORDER BY&lt;/span&gt;&lt;span&gt; id;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+--------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| id | note               |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+--------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;|  &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt; | written &lt;/span&gt;&lt;span&gt;on&lt;/span&gt;&lt;span&gt; feature |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+--------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Previously, this sequence would error on &lt;code&gt;COMMIT&lt;/code&gt; with a message indicating it wasn’t allowed.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; COMMIT&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;ERROR &lt;/span&gt;&lt;span&gt;1105&lt;/span&gt;&lt;span&gt; (HY000): Cannot &lt;/span&gt;&lt;span&gt;commit&lt;/span&gt;&lt;span&gt; changes&lt;/span&gt;&lt;span&gt; on&lt;/span&gt;&lt;span&gt; more than one branch &lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span&gt; database&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above example uses &lt;code&gt;DOLT_CHECKOUT&lt;/code&gt; to change the session’s branch. But you can also use
revision-qualified database names to insert into different branches directly.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; START TRANSACTION&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; INSERT INTO&lt;/span&gt;&lt;span&gt; `demo/main`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'written on main'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; INSERT INTO&lt;/span&gt;&lt;span&gt; `demo/feature`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'written on feature'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; COMMIT&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/main`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;ORDER BY&lt;/span&gt;&lt;span&gt; id;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| id | note            |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;|  &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; | written &lt;/span&gt;&lt;span&gt;on&lt;/span&gt;&lt;span&gt; main |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/feature`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;ORDER BY&lt;/span&gt;&lt;span&gt; id;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+--------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| id | note               |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+--------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;|  &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt; | written &lt;/span&gt;&lt;span&gt;on&lt;/span&gt;&lt;span&gt; feature |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+--------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The same sequence doesn’t work before 2.5.0.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; START TRANSACTION&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; INSERT INTO&lt;/span&gt;&lt;span&gt; `demo/main`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'written on main'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; INSERT INTO&lt;/span&gt;&lt;span&gt; `demo/feature`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'written on feature'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; COMMIT&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;ERROR &lt;/span&gt;&lt;span&gt;1105&lt;/span&gt;&lt;span&gt; (HY000): Cannot &lt;/span&gt;&lt;span&gt;commit&lt;/span&gt;&lt;span&gt; changes&lt;/span&gt;&lt;span&gt; on&lt;/span&gt;&lt;span&gt; more than one branch &lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span&gt; database&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Of course, Dolt wouldn’t be Dolt if you couldn’t create commits on your branches, just like Git. We
decided this is a disruptive enough change that it merits a new procedure:
&lt;code&gt;dolt_commit_all&lt;/code&gt;. It works just like &lt;code&gt;dolt_commit&lt;/code&gt;, but includes every branch with edits in a
session. For now, &lt;code&gt;dolt_commit()&lt;/code&gt; will continue to allow edits on only a single branch, just as
in previous releases.&lt;/p&gt;
&lt;p&gt;Here is the new &lt;code&gt;dolt_commit_all&lt;/code&gt; procedure in action.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; START TRANSACTION&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; INSERT INTO&lt;/span&gt;&lt;span&gt; notes &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'written on main'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; CALL&lt;/span&gt;&lt;span&gt; dolt_checkout(&lt;/span&gt;&lt;span&gt;'feature'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;--------+------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt; | &lt;/span&gt;&lt;span&gt;message&lt;/span&gt;&lt;span&gt;                      |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;--------+------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;|      &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; | Switched &lt;/span&gt;&lt;span&gt;to&lt;/span&gt;&lt;span&gt; branch &lt;/span&gt;&lt;span&gt;'feature'&lt;/span&gt;&lt;span&gt; |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;--------+------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; INSERT INTO&lt;/span&gt;&lt;span&gt; notes &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'written on feature'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; CALL&lt;/span&gt;&lt;span&gt; dolt_commit_all(&lt;/span&gt;&lt;span&gt;'-am'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Update both branches'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;---------+----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| branch  | &lt;/span&gt;&lt;span&gt;hash&lt;/span&gt;&lt;span&gt;                             |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;---------+----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| feature | r23lpqo1opnohgj54pv8cpokoc4u84jk |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| main    | vu228lb8hodsdp6qcc074vref2o52d6i |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;---------+----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/main`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;ORDER BY&lt;/span&gt;&lt;span&gt; id;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| id | note            |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;|  &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; | written &lt;/span&gt;&lt;span&gt;on&lt;/span&gt;&lt;span&gt; main |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; message&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/main`&lt;/span&gt;&lt;span&gt;.dolt_log &lt;/span&gt;&lt;span&gt;LIMIT&lt;/span&gt;&lt;span&gt; 1&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;message&lt;/span&gt;&lt;span&gt;              |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;Update&lt;/span&gt;&lt;span&gt; both&lt;/span&gt;&lt;span&gt; branches |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/feature`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;ORDER BY&lt;/span&gt;&lt;span&gt; id;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+--------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| id | note               |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+--------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;|  &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt; | written &lt;/span&gt;&lt;span&gt;on&lt;/span&gt;&lt;span&gt; feature |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+--------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; message&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/feature`&lt;/span&gt;&lt;span&gt;.dolt_log &lt;/span&gt;&lt;span&gt;LIMIT&lt;/span&gt;&lt;span&gt; 1&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;message&lt;/span&gt;&lt;span&gt;              |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;Update&lt;/span&gt;&lt;span&gt; both&lt;/span&gt;&lt;span&gt; branches |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Each branch gets a new Dolt commit written to it, using the same commit message. Note that, unlike
&lt;code&gt;dolt_commit&lt;/code&gt;, the new procedure returns multiple rows, one for each branch committed.&lt;/p&gt;
&lt;p&gt;This works the same with &lt;code&gt;dolt_checkout()&lt;/code&gt; or by using revision-qualified database names. In either
case, every branch with edits gets a new commit.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; START TRANSACTION&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; INSERT INTO&lt;/span&gt;&lt;span&gt; `demo/main`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'written on main'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; INSERT INTO&lt;/span&gt;&lt;span&gt; `demo/feature`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'written on feature'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; CALL&lt;/span&gt;&lt;span&gt; dolt_commit_all(&lt;/span&gt;&lt;span&gt;'-am'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Update both branches'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;---------+----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| branch  | &lt;/span&gt;&lt;span&gt;hash&lt;/span&gt;&lt;span&gt;                             |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;---------+----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| feature | m37ikatf3pr35ec0mme554ri114efc4r |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| main    | 90dtku58rqa8o7j06mi5tvhjiko9m0k4 |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;---------+----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This new feature is also compatible with setting the &lt;code&gt;@@dolt_transaction_commit&lt;/code&gt; system variable to
automatically create a new Dolt commit for every SQL commit. Just like with &lt;code&gt;dolt_commit&lt;/code&gt;, for now
we are retaining the previous behavior of allowing edits on only a single branch. To opt into the new
multi-branch commit behavior with &lt;code&gt;@@dolt_transaction_commit&lt;/code&gt;, set the new
&lt;code&gt;@@dolt_multi_branch_commit&lt;/code&gt; system variable.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SET&lt;/span&gt;&lt;span&gt; @@dolt_transaction_commit &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; TRUE;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SET&lt;/span&gt;&lt;span&gt; @@dolt_multi_branch_commit &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; TRUE;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SET&lt;/span&gt;&lt;span&gt; @@dolt_transaction_commit_message &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; 'Update both branches'&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; START TRANSACTION&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; INSERT INTO&lt;/span&gt;&lt;span&gt; `demo/main`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'written on main'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; INSERT INTO&lt;/span&gt;&lt;span&gt; `demo/feature`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'written on feature'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; COMMIT&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/main`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;ORDER BY&lt;/span&gt;&lt;span&gt; id;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| id | note            |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;|  &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; | written &lt;/span&gt;&lt;span&gt;on&lt;/span&gt;&lt;span&gt; main |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; message&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/main`&lt;/span&gt;&lt;span&gt;.dolt_log &lt;/span&gt;&lt;span&gt;LIMIT&lt;/span&gt;&lt;span&gt; 1&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;message&lt;/span&gt;&lt;span&gt;              |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;Update&lt;/span&gt;&lt;span&gt; both&lt;/span&gt;&lt;span&gt; branches |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/feature`&lt;/span&gt;&lt;span&gt;.notes &lt;/span&gt;&lt;span&gt;ORDER BY&lt;/span&gt;&lt;span&gt; id;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+--------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| id | note               |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+--------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;|  &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt; | written &lt;/span&gt;&lt;span&gt;on&lt;/span&gt;&lt;span&gt; feature |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+--------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; message&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/feature`&lt;/span&gt;&lt;span&gt;.dolt_log &lt;/span&gt;&lt;span&gt;LIMIT&lt;/span&gt;&lt;span&gt; 1&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;message&lt;/span&gt;&lt;span&gt;              |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;Update&lt;/span&gt;&lt;span&gt; both&lt;/span&gt;&lt;span&gt; branches |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h1 id="why-now"&gt;Why now?&lt;a class="anchor-link" aria-label="Link to heading" href="#why-now"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;We’ve had this feature on our roadmap for a long time, but our customers weren’t asking for the
ability to atomically commit multiple branches at the same time. You can’t do this in Git, and
people aren’t used to thinking about version control this way. But there was an exception:
&lt;a href="https://www.dolthub.com/blog/2025-10-06-nonlocal-tables/"&gt;non-local tables&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Non-local tables live on one branch but show up (with that branch’s contents) in another. It’s a way
to have “global” data that’s the same on all branches without constantly needing to merge it into
every affected branch. This is commonly done for data that doesn’t make sense to version on each
branch separately, such as the list of users. This feature has been more popular than we expected,
especially in the age of agentic engineering. It’s a natural fit for a bunch of different problems,
and agents have made wide use of it.&lt;/p&gt;
&lt;p&gt;But non-local tables had a problem. People didn’t just want to treat them as read-only. They wanted
to write application logic that updated global values and branch-local values in the same
transaction, and when they tried, they got an error message, since this would mean committing to
more than one branch in the same transaction.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; COMMIT&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;ERROR &lt;/span&gt;&lt;span&gt;1105&lt;/span&gt;&lt;span&gt; (HY000): Cannot &lt;/span&gt;&lt;span&gt;commit&lt;/span&gt;&lt;span&gt; changes&lt;/span&gt;&lt;span&gt; on&lt;/span&gt;&lt;span&gt; more than one branch &lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span&gt; database&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With Dolt 2.5.0, it is now possible to atomically commit non-local tables and branch-local tables in
the same transaction. In fact, we developed this new multi-branch commit feature primarily to
support this use case.&lt;/p&gt;
&lt;p&gt;Here’s an example of it in action.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;CREATE&lt;/span&gt;&lt;span&gt; TABLE&lt;/span&gt;&lt;span&gt; shared_notes&lt;/span&gt;&lt;span&gt; (id &lt;/span&gt;&lt;span&gt;INT&lt;/span&gt;&lt;span&gt; PRIMARY KEY&lt;/span&gt;&lt;span&gt;, note &lt;/span&gt;&lt;span&gt;VARCHAR&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;40&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;CALL&lt;/span&gt;&lt;span&gt; dolt_commit(&lt;/span&gt;&lt;span&gt;'-Am'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Create shared table'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;CALL&lt;/span&gt;&lt;span&gt; dolt_checkout(&lt;/span&gt;&lt;span&gt;'-b'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'feature'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;CREATE&lt;/span&gt;&lt;span&gt; TABLE&lt;/span&gt;&lt;span&gt; local_notes&lt;/span&gt;&lt;span&gt; (id &lt;/span&gt;&lt;span&gt;INT&lt;/span&gt;&lt;span&gt; PRIMARY KEY&lt;/span&gt;&lt;span&gt;, note &lt;/span&gt;&lt;span&gt;VARCHAR&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;40&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;INSERT INTO&lt;/span&gt;&lt;span&gt; dolt_nonlocal_tables (table_name, target_ref, ref_table, options) &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;'remote_notes'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'main'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'shared_notes'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'immediate'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;CALL&lt;/span&gt;&lt;span&gt; dolt_commit(&lt;/span&gt;&lt;span&gt;'-Am'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Configure non-local table'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; dolt_version(), active_branch();&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| dolt_version() | active_branch() |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;5&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;          | feature         |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----------------+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; START TRANSACTION&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; INSERT INTO&lt;/span&gt;&lt;span&gt; local_notes &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'local on feature'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; INSERT INTO&lt;/span&gt;&lt;span&gt; remote_notes &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'shared on main'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; COMMIT&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;Query OK, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; affected&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/feature`&lt;/span&gt;&lt;span&gt;.local_notes;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| id | note             |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;|  &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; | &lt;/span&gt;&lt;span&gt;local&lt;/span&gt;&lt;span&gt; on&lt;/span&gt;&lt;span&gt; feature |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/main`&lt;/span&gt;&lt;span&gt;.shared_notes;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| id | note           |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;|  &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt; | shared &lt;/span&gt;&lt;span&gt;on&lt;/span&gt;&lt;span&gt; main |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And of course, the same pattern also works with &lt;code&gt;dolt_commit_all()&lt;/code&gt;, which can include changes to
both local and non-local tables in the same transaction. The host branch gets a new Dolt commit,
along with any locally edited branches.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; CALL&lt;/span&gt;&lt;span&gt; dolt_commit_all(&lt;/span&gt;&lt;span&gt;'-am'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Update local and non-local tables'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;---------+----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| branch  | &lt;/span&gt;&lt;span&gt;hash&lt;/span&gt;&lt;span&gt;                             |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;---------+----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| feature | mjhq9feqnpvdi4shsl6ipdcem8esg67v |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| main    | i4mm0evobqucvn2963bjpepn99f5hk79 |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;---------+----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt; rows&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/feature`&lt;/span&gt;&lt;span&gt;.local_notes;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| id | note             |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;|  &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; | &lt;/span&gt;&lt;span&gt;local&lt;/span&gt;&lt;span&gt; on&lt;/span&gt;&lt;span&gt; feature |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/main`&lt;/span&gt;&lt;span&gt;.shared_notes;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| id | note           |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;|  &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt; | shared &lt;/span&gt;&lt;span&gt;on&lt;/span&gt;&lt;span&gt; main |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;----+----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; message&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/feature`&lt;/span&gt;&lt;span&gt;.dolt_log &lt;/span&gt;&lt;span&gt;LIMIT&lt;/span&gt;&lt;span&gt; 1&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;message&lt;/span&gt;&lt;span&gt;                           |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;Update&lt;/span&gt;&lt;span&gt; local&lt;/span&gt;&lt;span&gt; and&lt;/span&gt;&lt;span&gt; non&lt;/span&gt;&lt;span&gt;-local&lt;/span&gt;&lt;span&gt; tables |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; SELECT&lt;/span&gt;&lt;span&gt; message&lt;/span&gt;&lt;span&gt; FROM&lt;/span&gt;&lt;span&gt; `demo/main`&lt;/span&gt;&lt;span&gt;.dolt_log &lt;/span&gt;&lt;span&gt;LIMIT&lt;/span&gt;&lt;span&gt; 1&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;message&lt;/span&gt;&lt;span&gt;                           |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| &lt;/span&gt;&lt;span&gt;Update&lt;/span&gt;&lt;span&gt; local&lt;/span&gt;&lt;span&gt; and&lt;/span&gt;&lt;span&gt; non&lt;/span&gt;&lt;span&gt;-local&lt;/span&gt;&lt;span&gt; tables |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-----------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; row&lt;/span&gt;&lt;span&gt; in&lt;/span&gt;&lt;span&gt; set&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h1 id="conclusion"&gt;Conclusion&lt;a class="anchor-link" aria-label="Link to heading" href="#conclusion"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Commits to multiple branches in the same transaction are available today in Dolt 2.5.0. Doltgres will
get this capability in its next release.&lt;/p&gt;
&lt;p&gt;Multi-branch commits are an exciting new capability in version-controlled databases, and we are very
curious to see what our customers will build with it. Non-local tables are an obvious first
candidate, since this new ability makes them much easier to use correctly. What else will you come
up with?&lt;/p&gt;
&lt;p&gt;Have questions about multi-branch commits? Want to learn more about Dolt and Doltgres? Visit us on
the &lt;a href="https://discord.gg/gqr7K4VNKe"&gt;DoltHub Discord&lt;/a&gt; where our engineering team hangs out all
day. Hope to see you there.&lt;/p&gt;</content:encoded>
      <dc:creator>Zach Musgrave</dc:creator>
      <category>dolt</category>
      <category>feature release</category>
    </item>
    <item>
      <title>Q4 Roadmap Update: What's Coming Next for Dolt and Doltgres</title>
      <link>https://dolthub.com/blog/2026-10-07-roadmap-update/</link>
      <guid isPermaLink="true">https://dolthub.com/blog/2026-10-07-roadmap-update/</guid>
      <description>Learn what features we're working on next in Dolt and Doltgres</description>
      <pubDate>Wed, 07 Oct 2026 00:00:00 GMT</pubDate>
      <content:encoded>&lt;p&gt;2026 has been a big year for DoltHub so far. In May, we launched &lt;a href="https://www.dolthub.com/blog/2026-05-11-dolt-2-dot-0/"&gt;Dolt
2.0&lt;/a&gt;, our second major release of the world’s
first version-controlled SQL database. Dolt 2.0 brought performance parity with MySQL, as well as
much better disk usage and a lot of new features. Then in August, we launched &lt;a href="https://www.dolthub.com/blog/2026-08-06-doltgres-1-0/"&gt;Doltgres
1.0&lt;/a&gt;, signaling that the Postgres-flavored
version of Dolt is ready for production use. On top of those two major releases, we’ve also seen a
surge of new interest in Dolt as an enabler for &lt;a href="https://www.dolthub.com/blog/2025-03-17-dolt-agentic-workflows/"&gt;agentic
engineering&lt;/a&gt;, especially through
the agent memory tool &lt;a href="https://github.com/gastownhall/beads"&gt;Beads&lt;/a&gt;, which uses Dolt as its storage
backend. And we launched two new database products written with agentic engineering,
&lt;a href="https://github.com/dolthub/doltlite"&gt;DoltLite&lt;/a&gt; and
&lt;a href="https://github.com/dolthub/dumbodb"&gt;DumboDB&lt;/a&gt;. All in all, 2026 has been a year of accelerating
interest and usage for all our version-controlled database tools, with agents pouring fuel on the
fire.&lt;/p&gt;
&lt;p&gt;All this new attention has also shifted our &lt;a href="https://www.dolthub.com/docs/other/roadmap/"&gt;engineering
roadmap&lt;/a&gt; a bit. We publish updates to the roadmap at
the start of every quarter, and Q4’s update just went out. In line with the increased number of
eyeballs, this update is one of the largest ones we’ve ever released. Its main focus is Doltgres,
where new customers are rapidly finding and filing issues for compatibility gaps.&lt;/p&gt;
&lt;p&gt;Let’s take a look at the major themes.&lt;/p&gt;
&lt;h1 id="row-level-security"&gt;Row-level security&lt;a class="anchor-link" aria-label="Link to heading" href="#row-level-security"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;We’ve written a lot in the past about how Postgres’s surface area of features is just much, much
larger than MySQL’s, but we continue to be surprised by just how much larger, and how many of these
features are used by a critical mass of potential customers. One such feature is &lt;a href="https://www.postgresql.org/docs/current/ddl-rowsecurity.html"&gt;row-level
security&lt;/a&gt;, which is a way to configure
your server to return different rows for the same query to different users, or to prevent certain
roles from inserting certain values or updating certain rows. It’s complex and can be used to enable
a lot of different use cases.&lt;/p&gt;
&lt;p&gt;We’re building support for row-level security into Doltgres now, and you can expect it before the
end of the year.&lt;/p&gt;
&lt;h1 id="support-for-postgis-and-other-popular-postgres-extensions"&gt;Support for PostGIS and other popular Postgres extensions&lt;a class="anchor-link" aria-label="Link to heading" href="#support-for-postgis-and-other-popular-postgres-extensions"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Postgres has a robust extension framework most commonly used to define new types and functions that
operate on them. Some of these are very widely used, being part of standard Postgres in all but
name. These include &lt;a href="https://postgis.net/"&gt;PostGIS&lt;/a&gt;, which supports spatial data and queries, as
well as &lt;a href="https://www.postgresql.org/docs/current/pgcrypto.html"&gt;pgcrypto&lt;/a&gt;, which handles a variety
of cryptographic concerns. Doltgres 1.0 shipped without support for these critical features, but
we’re racing to close that gap.&lt;/p&gt;
&lt;p&gt;Expect support for PostGIS and &lt;code&gt;pgcrypto&lt;/code&gt; by the end of the year.&lt;/p&gt;
&lt;h1 id="select--for-update"&gt;&lt;code&gt;SELECT ... FOR UPDATE&lt;/code&gt;&lt;a class="anchor-link" aria-label="Link to heading" href="#select--for-update"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Since the launch of Dolt 1.0, exclusive row-level locking has been one of our most requested
features. In the traditional database world, these locks are how you make sure that two concurrent
clients can coordinate their writes safely. But Dolt took a very different approach to solving this
same problem &lt;a href="https://www.dolthub.com/blog/2021-05-19-dolt-transactions/"&gt;from the very beginning&lt;/a&gt;,
merging concurrent writes together and detecting conflicts without any locking. For whatever reason,
this alternate approach has worked great for Dolt’s customers but isn’t good enough for Doltgres’s
customers. They are using tools that require the same row-level locking semantics that Postgres uses
to make their applications work as expected.&lt;/p&gt;
&lt;p&gt;So we’re fixing it. Expect row-level exclusive locks by early next year, for both Dolt and Doltgres.&lt;/p&gt;
&lt;h1 id="different-transaction-isolation-levels"&gt;Different transaction isolation levels&lt;a class="anchor-link" aria-label="Link to heading" href="#different-transaction-isolation-levels"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;SQL transactions can declare different levels of isolation from other concurrent transactions to
control what writes from other sessions become visible to them, and when. The most common isolation
level in the MySQL world is &lt;code&gt;REPEATABLE_READ&lt;/code&gt;, which means that a transaction will
not see writes committed by other transactions until it issues a &lt;code&gt;COMMIT&lt;/code&gt; or &lt;code&gt;ROLLBACK&lt;/code&gt;
statement. This is what’s implemented by Dolt’s session management logic.&lt;/p&gt;
&lt;p&gt;But in the Postgres world, the default is &lt;code&gt;READ_COMMITTED&lt;/code&gt;, which means that a transaction will
begin seeing updates from other transactions as soon as they are committed. Dolt has never supported
this isolation level, and it’s a lot of work to do so. But this is what our new Doltgres customers
need, so we’re building it.&lt;/p&gt;
&lt;p&gt;Expect &lt;code&gt;READ_COMMITTED&lt;/code&gt; support early next year, released in tandem with row-level locks.&lt;/p&gt;
&lt;h1 id="but-wait-theres-more"&gt;But wait, there’s more!&lt;a class="anchor-link" aria-label="Link to heading" href="#but-wait-theres-more"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Our roadmap is deliberately curated to include only large-scale initiatives and frequently requested
features. But we’re also constantly at work on bug fixes and smaller features requested by our
customers. Read the blog or watch our &lt;a href="https://github.com/dolthub/dolt/issues"&gt;GitHub issue queue&lt;/a&gt;
to stay up to date on these frequent changes. You can also join the &lt;a href="https://discord.gg/gqr7K4VNKe"&gt;DoltHub
Discord&lt;/a&gt; to discuss anything on your mind with our engineering team
in real-time.&lt;/p&gt;
&lt;p&gt;Our roadmap also currently excludes our two agent-written database products,
&lt;a href="https://github.com/dolthub/doltlite"&gt;DoltLite&lt;/a&gt; and
&lt;a href="https://github.com/dolthub/dumbodb"&gt;DumboDB&lt;/a&gt;. These are both evolving so rapidly that any roadmap
commitments would quickly become obsolete. But as these products mature and we get ready for their
1.0 releases, we’ll definitely add them to the roadmap.&lt;/p&gt;
&lt;h1 id="conclusion"&gt;Conclusion&lt;a class="anchor-link" aria-label="Link to heading" href="#conclusion"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;2026 is shaping up to be our biggest year of releases ever, and our roadmap is one of the most
important ways we communicate our plans to our customers. Remember: paying customers get write
access to those plans.&lt;/p&gt;
&lt;p&gt;Have input on our roadmap? Anything important to your use case that we’re not working on but should
be? Visit us on the &lt;a href="https://discord.gg/gqr7K4VNKe"&gt;DoltHub Discord&lt;/a&gt; where our engineering team
hangs out all day. Hope to see you there.&lt;/p&gt;</content:encoded>
      <dc:creator>Zach Musgrave</dc:creator>
      <category>doltgres</category>
      <category>dolt</category>
    </item>
    <item>
      <title>Finding Bugs Using Join Implication Reasoning</title>
      <link>https://dolthub.com/blog/2026-10-05-join-implication-reasoning/</link>
      <guid isPermaLink="true">https://dolthub.com/blog/2026-10-05-join-implication-reasoning/</guid>
      <description>We review "Detecting Join Bugs in Database Engines via Join Implication Reasoning," a research paper from the TEST Lab at NUS that tests the correctness of join queries in databases by generating equivalent join queries.</description>
      <pubDate>Mon, 05 Oct 2026 00:00:00 GMT</pubDate>
      <content:encoded>&lt;p&gt;As the world’s first version-controlled SQL database and with &lt;a href="https://github.com/dolthub/dolt"&gt;24.6k (and counting) stars on GitHub&lt;/a&gt;, Dolt has received a lot of interest from academic researchers over the years. In the past couple of weeks, I have been writing about the &lt;a href="https://www.dolthub.com/blog/2026-09-18-nus-test-lab/"&gt;research with Dolt done by the TEST Lab at National University of Singapore&lt;/a&gt;. Last week, I wrote about Suyang Zhong’s work on &lt;a href="https://www.dolthub.com/blog/2026-09-25-sqlancerplusplus/"&gt;SQLancer++&lt;/a&gt;. Today, I will be reviewing &lt;a href="https://dl.acm.org/doi/10.1145/3802036"&gt;“Detecting Join Bugs in Database Engines via Join Implication Reasoning”&lt;/a&gt; by Zhaokun Xiang. This paper was published earlier this year as part of &lt;a href="https://dl.acm.org/toc/pacmmod/2026/4/3"&gt;Proceedings of the ACM on Management of Data&lt;/a&gt; and presented at &lt;a href="https://sigmod.org/"&gt;SIGMOD&lt;/a&gt;. Some of y’all may know Zhaokun Xiang as &lt;a href="https://github.com/TheoristCoder"&gt;&lt;code&gt;theoristcoder&lt;/code&gt; on GitHub&lt;/a&gt; – last year, I wrote about the &lt;a href="https://www.dolthub.com/blog/2025-12-03-new-zero-time/"&gt;changes made to zero time&lt;/a&gt; due to a bug found by Zhaokun. Now, let’s dive into the paper.&lt;/p&gt;
&lt;h1 id="join-implication-reasoning"&gt;Join Implication Reasoning&lt;a class="anchor-link" aria-label="Link to heading" href="#join-implication-reasoning"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;One of the biggest reasons to choose relational databases over their non-relational counterparts is the support for complex &lt;a href="https://en.wikipedia.org/wiki/Join_(SQL)"&gt;joins&lt;/a&gt;. In order to execute a join query as efficiently as possible, SQL query analyzers apply a series of optimization rules, including &lt;a href="https://www.dolthub.com/blog/2020-10-28-pushdown-filters/"&gt;filter pushdowns&lt;/a&gt;, &lt;a href="https://www.dolthub.com/blog/2023-12-13-functional-dependency-analysis/"&gt;join reordering&lt;/a&gt;, &lt;a href="https://www.dolthub.com/blog/2022-11-04-memoizing-joins/"&gt;memoization&lt;/a&gt;, and &lt;a href="https://www.dolthub.com/blog/2024-01-22-join-statistics/"&gt;cost analysis&lt;/a&gt;. Many of these optimization rules have been implemented in &lt;a href="https://github.com/dolthub/go-mysql-server/tree/main"&gt;go-mysql-server&lt;/a&gt;, the SQL query engine that powers Dolt. However, fast doesn’t always mean correct if the rules are not applied properly – after all, &lt;a href="https://www.youtube.com/watch?v=b2F-DItXtZs"&gt;piping to &lt;code&gt;/dev/null&lt;/code&gt; is fast as hell&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Join implication reasoning (JIR) is a testing technique implemented as an extension of &lt;a href="https://sqlancer.github.io/"&gt;SQLancer&lt;/a&gt; that focuses on join correctness. Oftentimes, a join query can be rewritten to use different join types and still produce the same result – this is the motivation for join reordering during query optimization. JIR takes these logically equivalent join queries and uses them as test oracles, making sure that a database actually returns the same result for both queries. The paper outlines six join-equivalence rules as well as proofs for each rule. For example, a left outer join can be rewritten as a combination of an inner join and an anti-join with appropriate null-padding. Another example is that a right outer join is the same as a left outer join with the sides of the join swapped and vice versa.&lt;/p&gt;
&lt;p&gt;The implementation of JIR involves generating random join queries represented by &lt;a href="https://en.wikipedia.org/wiki/Abstract_syntax_tree"&gt;abstract syntax trees (ASTs)&lt;/a&gt; and randomly generated boolean join predicates (also known as join conditions). More queries are subsequently generated by replacing the join types at each node of the ASTs. Equivalent queries are generated as well using the join-equivalence rules. Each pair of equivalent queries is run against the database and the results are compared.&lt;/p&gt;
&lt;p&gt;JIR was implemented in both SQLancer and SQLancer++. While SQLancer was already able to generate joins, JIR extended it by generating joins with subqueries and adding randomly generated join conditions.&lt;/p&gt;
&lt;p&gt;To compare the efficacy of JIR, databases were run with both JIR and &lt;a href="https://dl.acm.org/doi/10.1145/3654991"&gt;differential query plan (DQP)&lt;/a&gt; extensions of SQLancer or SQLancer++, and the number of bugs found by each method were compared to each other. DQP is an earlier project from the TEST Lab which was published in 2024.&lt;/p&gt;
&lt;h2 id="so-does-it-use-ai"&gt;So does it use AI?&lt;a class="anchor-link" aria-label="Link to heading" href="#so-does-it-use-ai"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Similar to SQLancer++, JIR uses rule-based generation and does not use a &lt;a href="https://en.wikipedia.org/wiki/Large_language_model"&gt;large language model (LLM)&lt;/a&gt; or &lt;a href="https://en.wikipedia.org/wiki/Generative_AI#Generative_neural_networks_(since_the_late_2000s)"&gt;generative neural network&lt;/a&gt;, so it does not use “generative AI” in the 2026 colloquial sense of the term. Someone 20 years ago might call it AI, but it’s unlikely that someone today would.&lt;/p&gt;
&lt;h1 id="impact-on-dolt"&gt;Impact on Dolt&lt;a class="anchor-link" aria-label="Link to heading" href="#impact-on-dolt"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The paper claims to have found 12 unique bugs in Dolt via JIR and 3 unique bugs via DQP; at the time the paper was written, 10 out of 12 of the JIR-found bugs were fixed and all of the DQP-found bugs were fixed. From my perspective, I’m not able to identify via our issues queue whether a bug was found by JIR or DQP and what criterion for uniqueness was used, but Zhaokun did file &lt;a href="https://github.com/dolthub/dolt/issues?q=is%3Aissue+author%3Atheoristcoder"&gt;19 bugs&lt;/a&gt; between November 2025 and February 2026. As of February 10, 2026, every single bug has been fixed.&lt;/p&gt;
&lt;p&gt;The majority of these bugs involved anti-joins. This makes sense since anti-joins often involve subqueries, which were previously not supported for join queries in SQLancer. There were also several bugs involving left joins and a few bugs involving how inner joins were optimized into other join types during join planning.&lt;/p&gt;
&lt;p&gt;Correctness in Dolt is something we really value, and we are really appreciative of the work Zhaokun has done to ensure the correctness in joins. As mentioned in the paper, join bugs can be tricky to identify due to the number of optimization rules applied and they can get especially complex when multiple joins are involved.&lt;/p&gt;
&lt;p&gt;Are you an academic researcher working on a project with Dolt or another DoltHub database? Join our &lt;a href="https://discord.gg/b3deB8WJh"&gt;Discord community&lt;/a&gt; – we’d love to hear from you.&lt;/p&gt;</content:encoded>
      <dc:creator>Angela Xie</dc:creator>
      <category>dolt</category>
    </item>
    <item>
      <title>Your Replica Doesn't Need to Know Everything</title>
      <link>https://dolthub.com/blog/2026-09-23-wildcard-binlog-filters/</link>
      <guid isPermaLink="true">https://dolthub.com/blog/2026-09-23-wildcard-binlog-filters/</guid>
      <description>Dolt now supports MySQL-compatible wildcard table filters for binlog replication, so replicas can selectively apply row changes from matching tables.</description>
      <pubDate>Wed, 23 Sep 2026 00:00:00 GMT</pubDate>
      <content:encoded>&lt;p&gt;&lt;a href="https://doltdb.com/"&gt;Dolt&lt;/a&gt; is a MySQL-compatible SQL database with Git-style version control built in. You can branch, merge, diff, clone, push, and pull your data just like you do with source code. You can also connect Dolt to MySQL’s binlog replication protocol, which opens up several useful architectures between MySQL (or MariaDB) and Dolt.&lt;/p&gt;
&lt;p&gt;Replicas tend to be enthusiastic little copy machines. Unless told otherwise, they copy every change they receive. That is exactly what you want for a hot standby, but it can be wasteful when a replica serves a narrower purpose and only needs changes from a particular family of tables.&lt;/p&gt;
&lt;p&gt;A Dolt user recently &lt;a href="https://github.com/dolthub/dolt/issues/11787"&gt;opened a feature request&lt;/a&gt; asking us to support MySQL’s &lt;code&gt;REPLICATE_WILD_DO_TABLE&lt;/code&gt; and &lt;code&gt;REPLICATE_WILD_IGNORE_TABLE&lt;/code&gt; filters. It was a useful, well-scoped request, and we were happy to turn around the wildcard filtering support in less than a week. It shipped in &lt;a href="https://github.com/dolthub/dolt/releases/tag/v2.3.5"&gt;Dolt 2.3.5&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Let’s look at why you might want a filtered replica and then investigate a string of suspicious lunch disappearances. This investigation may be more rigorous than the situation warrants, but that has never stopped a database engineer before.&lt;/p&gt;
&lt;h2 id="why-filter-a-replica"&gt;Why Filter a Replica?&lt;a class="anchor-link" aria-label="Link to heading" href="#why-filter-a-replica"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Traditional replication use cases usually need a complete copy of the source database:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;high-availability replica&lt;/strong&gt; needs all the data so it can take over if the primary fails.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;disaster-recovery replica&lt;/strong&gt; needs a complete copy in another availability zone or region.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;read-scaling replica&lt;/strong&gt; often serves the same application queries as the primary.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Filtered replicas solve a different problem. An analytics replica may only need &lt;code&gt;orders_*&lt;/code&gt; and &lt;code&gt;sales_*&lt;/code&gt; tables. A service-specific read model may only need tables owned by one application domain. A regional replica may only need tables named for that region. You may also want to exclude high-volume scratch or archive tables that provide no value on the replica.&lt;/p&gt;
&lt;p&gt;One of my favorite uses of Dolt’s binlog replication support is adding a Dolt replica to an existing MySQL or MariaDB system. The application keeps using its current primary while Dolt receives selected changes and turns them into versioned Dolt commits. This gives you a queryable history, including diffs between revisions, without requiring a full database migration on day one.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://static.dolthub.com/blogimages/wildcard-binlog-filtering.svg/a3fb00a1c9a42c61284d7ffde4f885acbcc7365c6e3fd81036a29dca9d12029d.svg" alt="Wildcard row filters send matching row events to a versioned Dolt replica while nonmatching row events are skipped"&gt;&lt;/p&gt;
&lt;h2 id="wildcard-table-filters"&gt;Wildcard Table Filters&lt;a class="anchor-link" aria-label="Link to heading" href="#wildcard-table-filters"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Dolt already supported exact table filters through &lt;code&gt;REPLICATE_DO_TABLE&lt;/code&gt; and &lt;code&gt;REPLICATE_IGNORE_TABLE&lt;/code&gt;. Dolt 2.3.5 adds the wildcard variants:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;REPLICATE_WILD_DO_TABLE&lt;/code&gt; replicates row changes from tables that match a pattern and excludes unmatched tables.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;REPLICATE_WILD_IGNORE_TABLE&lt;/code&gt; replicates row changes normally but skips tables that match a pattern.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Patterns contain a database pattern and a table pattern separated by a period. They use MySQL’s wildcard syntax:&lt;/p&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Pattern&lt;/th&gt;&lt;th&gt;Meaning&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;%&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Match any sequence of bytes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;_&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Match one byte&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;\%&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Match a literal percent sign&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;\_&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Match a literal underscore&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;For example, &lt;code&gt;sales.orders%&lt;/code&gt; matches tables in the &lt;code&gt;sales&lt;/code&gt; database whose names start with &lt;code&gt;orders&lt;/code&gt;. Because &lt;code&gt;_&lt;/code&gt; is a wildcard, a literal underscore must be escaped. The pattern &lt;code&gt;breakroom.case\_%&lt;/code&gt; matches &lt;code&gt;case_open&lt;/code&gt; and &lt;code&gt;case_closed&lt;/code&gt;, but not &lt;code&gt;caseworker_notes&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="the-great-office-lunch-investigation"&gt;The Great Office Lunch Investigation&lt;a class="anchor-link" aria-label="Link to heading" href="#the-great-office-lunch-investigation"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For this demo, we have a MySQL source server and a Dolt replica. The MySQL server is running on port &lt;code&gt;11229&lt;/code&gt; with GTIDs, binary logging, and row-format binlogs enabled. If you already have a MySQL source configured, you can skip the setup below, but keep in mind that you’ll need to update the replica configuration below with your existing server’s details. If your source contains existing data, our &lt;a href="https://www.dolthub.com/docs/guides/binlog-replication/"&gt;versioned MySQL replica guide&lt;/a&gt; also explains how to warm the replica with a snapshot before starting replication.&lt;/p&gt;
&lt;h3 id="start-a-local-mysql-source"&gt;Start a Local MySQL Source&lt;a class="anchor-link" aria-label="Link to heading" href="#start-a-local-mysql-source"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;First, create an isolated MySQL data directory. &lt;code&gt;--initialize-insecure&lt;/code&gt; gives the local &lt;code&gt;root&lt;/code&gt; account no password, which is convenient for this disposable demo and a terrible production security policy.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sh"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mkdir&lt;/span&gt;&lt;span&gt; mysql-source&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;cd&lt;/span&gt;&lt;span&gt; mysql-source&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mysqld&lt;/span&gt;&lt;span&gt; --no-defaults&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  --initialize-insecure&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  --datadir=&lt;/span&gt;&lt;span&gt;"&lt;/span&gt;&lt;span&gt;$PWD&lt;/span&gt;&lt;span&gt;/data"&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now start MySQL with binary logging, row-format events, GTIDs, and a unique server ID:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sh"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysqld&lt;/span&gt;&lt;span&gt; --no-defaults&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  --datadir=&lt;/span&gt;&lt;span&gt;"&lt;/span&gt;&lt;span&gt;$PWD&lt;/span&gt;&lt;span&gt;/data"&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  --port=11229&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  --bind-address=127.0.0.1&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  --socket=&lt;/span&gt;&lt;span&gt;"&lt;/span&gt;&lt;span&gt;$PWD&lt;/span&gt;&lt;span&gt;/mysql.sock"&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  --server-id=41&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  --log-bin=&lt;/span&gt;&lt;span&gt;"&lt;/span&gt;&lt;span&gt;$PWD&lt;/span&gt;&lt;span&gt;/mysql-bin"&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  --binlog-format=ROW&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  --gtid-mode=ON&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  --enforce-gtid-consistency=ON&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  --mysqlx=0&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  --pid-file=&lt;/span&gt;&lt;span&gt;"&lt;/span&gt;&lt;span&gt;$PWD&lt;/span&gt;&lt;span&gt;/mysql.pid"&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  --log-error=&lt;/span&gt;&lt;span&gt;"&lt;/span&gt;&lt;span&gt;$PWD&lt;/span&gt;&lt;span&gt;/mysql.err"&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The four settings that matter to replication are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;server-id=41&lt;/code&gt; uniquely identifies this source in the replication topology.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;log-bin&lt;/code&gt; enables the binary log that replicas consume.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;binlog-format=ROW&lt;/code&gt; records the changed rows instead of replaying DML statements.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gtid-mode&lt;/code&gt; and &lt;code&gt;enforce-gtid-consistency&lt;/code&gt; enable GTID auto-positioning.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Leave that terminal running. In another terminal, connect to the source over TCP:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sh"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt; --protocol&lt;/span&gt;&lt;span&gt; TCP&lt;/span&gt;&lt;span&gt; -h&lt;/span&gt;&lt;span&gt; 127.0.0.1&lt;/span&gt;&lt;span&gt; -P&lt;/span&gt;&lt;span&gt; 11229&lt;/span&gt;&lt;span&gt; -uroot&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can verify the important settings from the MySQL shell:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;SHOW VARIABLES&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;WHERE&lt;/span&gt;&lt;span&gt; Variable_Name &lt;/span&gt;&lt;span&gt;IN&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  (&lt;/span&gt;&lt;span&gt;'log_bin'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'binlog_format'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'enforce_gtid_consistency'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'gtid_mode'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'server_id'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;--------------------------+-------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| Variable_name            | &lt;/span&gt;&lt;span&gt;Value&lt;/span&gt;&lt;span&gt; |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;--------------------------+-------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| binlog_format            | &lt;/span&gt;&lt;span&gt;ROW&lt;/span&gt;&lt;span&gt;   |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| enforce_gtid_consistency | &lt;/span&gt;&lt;span&gt;ON&lt;/span&gt;&lt;span&gt;    |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| gtid_mode                | &lt;/span&gt;&lt;span&gt;ON&lt;/span&gt;&lt;span&gt;    |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| log_bin                  | &lt;/span&gt;&lt;span&gt;ON&lt;/span&gt;&lt;span&gt;    |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| server_id                | &lt;/span&gt;&lt;span&gt;41&lt;/span&gt;&lt;span&gt;    |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;--------------------------+-------+&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;From a MySQL shell connected to the source, create a dedicated replication user:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;CREATE&lt;/span&gt;&lt;span&gt; USER&lt;/span&gt;&lt;span&gt; '&lt;/span&gt;&lt;span&gt;replicator&lt;/span&gt;&lt;span&gt;'@&lt;/span&gt;&lt;span&gt;'%'&lt;/span&gt;&lt;span&gt; IDENTIFIED &lt;/span&gt;&lt;span&gt;BY&lt;/span&gt;&lt;span&gt; 'password'&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;GRANT&lt;/span&gt;&lt;span&gt; REPLICATION SLAVE &lt;/span&gt;&lt;span&gt;ON&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt; TO&lt;/span&gt;&lt;span&gt; 'replicator'&lt;/span&gt;&lt;span&gt;@&lt;/span&gt;&lt;span&gt;'%'&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="start-the-dolt-replica"&gt;Start the Dolt Replica&lt;a class="anchor-link" aria-label="Link to heading" href="#start-the-dolt-replica"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Next, start a fresh Dolt SQL server for the replica. This demo requires Dolt 2.3.5 or later.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sh"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mkdir&lt;/span&gt;&lt;span&gt; dolt-replica&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;cd&lt;/span&gt;&lt;span&gt; dolt-replica&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;dolt&lt;/span&gt;&lt;span&gt; init&lt;/span&gt;&lt;span&gt; --name&lt;/span&gt;&lt;span&gt; "Lunch Detective"&lt;/span&gt;&lt;span&gt; --email&lt;/span&gt;&lt;span&gt; "detective@example.com"&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;dolt&lt;/span&gt;&lt;span&gt; sql-server&lt;/span&gt;&lt;span&gt; --port&lt;/span&gt;&lt;span&gt; 11230&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In another terminal, connect to the Dolt server with the MySQL client:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sh"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt; --protocol&lt;/span&gt;&lt;span&gt; TCP&lt;/span&gt;&lt;span&gt; -h&lt;/span&gt;&lt;span&gt; 127.0.0.1&lt;/span&gt;&lt;span&gt; -P&lt;/span&gt;&lt;span&gt; 11230&lt;/span&gt;&lt;span&gt; -uroot&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Configure the MySQL source, install our wildcard filter, and start replication:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;SET&lt;/span&gt;&lt;span&gt; @@&lt;/span&gt;&lt;span&gt;GLOBAL&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;server_id&lt;/span&gt;&lt;span&gt; =&lt;/span&gt;&lt;span&gt; 42&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;CHANGE REPLICATION SOURCE &lt;/span&gt;&lt;span&gt;TO&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  SOURCE_HOST &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; '127.0.0.1'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  SOURCE_PORT &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; 11229&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  SOURCE_USER &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; 'replicator'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  SOURCE_PASSWORD &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; 'password'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  SOURCE_AUTO_POSITION &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; 1&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;CHANGE REPLICATION &lt;/span&gt;&lt;span&gt;FILTER&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  REPLICATE_WILD_DO_TABLE &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;'breakroom.case\\_%'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;START&lt;/span&gt;&lt;span&gt; REPLICA&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;One restart note: &lt;a href="https://dev.mysql.com/doc/refman/8.4/en/change-replication-filter.html"&gt;MySQL does not persist filters set with &lt;code&gt;CHANGE REPLICATION FILTER&lt;/code&gt;&lt;/a&gt;, and Dolt matches that behavior. The connection settings from &lt;code&gt;CHANGE REPLICATION SOURCE&lt;/code&gt; persist, but you must apply the wildcard filter again after restarting the Dolt server. For a planned restart, run &lt;code&gt;STOP REPLICA&lt;/code&gt; before shutting down, then reapply the filter before running &lt;code&gt;START REPLICA&lt;/code&gt; again. This avoids briefly auto-starting replication without the filter in place.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There are two backslashes in the SQL string because one escapes the other in the string literal. The resulting filter pattern contains one backslash, which tells the wildcard matcher to treat the underscore literally.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;CHANGE REPLICATION FILTER&lt;/code&gt; cannot run while the replica SQL thread is active. If you are changing filters on an existing replica, run &lt;code&gt;STOP REPLICA&lt;/code&gt; first, update the filters, and then run &lt;code&gt;START REPLICA&lt;/code&gt; again.&lt;/p&gt;
&lt;p&gt;We can confirm that both replication and the filter are active:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;SHOW &lt;/span&gt;&lt;span&gt;REPLICA&lt;/span&gt;&lt;span&gt; STATUS&lt;/span&gt;&lt;span&gt;\G&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The complete output contains more replication state, but these are the fields we care about:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="text"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;            Replica_IO_Running: Yes&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;           Replica_SQL_Running: Yes&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;       Replicate_Wild_Do_Table: breakroom.case\_%&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;   Replicate_Wild_Ignore_Table:&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now reconnect to the MySQL source and create the world’s most over-engineered breakroom incident-response system:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sh"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mysql&lt;/span&gt;&lt;span&gt; --protocol&lt;/span&gt;&lt;span&gt; TCP&lt;/span&gt;&lt;span&gt; -h&lt;/span&gt;&lt;span&gt; 127.0.0.1&lt;/span&gt;&lt;span&gt; -P&lt;/span&gt;&lt;span&gt; 11229&lt;/span&gt;&lt;span&gt; -uroot&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;CREATE&lt;/span&gt;&lt;span&gt; DATABASE&lt;/span&gt;&lt;span&gt; breakroom&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;USE&lt;/span&gt;&lt;span&gt; breakroom;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;CREATE&lt;/span&gt;&lt;span&gt; TABLE&lt;/span&gt;&lt;span&gt; case_open&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  id &lt;/span&gt;&lt;span&gt;INT&lt;/span&gt;&lt;span&gt; PRIMARY KEY&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  missing_lunch &lt;/span&gt;&lt;span&gt;VARCHAR&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;100&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  prime_suspect &lt;/span&gt;&lt;span&gt;VARCHAR&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;100&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;CREATE&lt;/span&gt;&lt;span&gt; TABLE&lt;/span&gt;&lt;span&gt; case_closed&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  id &lt;/span&gt;&lt;span&gt;INT&lt;/span&gt;&lt;span&gt; PRIMARY KEY&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  missing_lunch &lt;/span&gt;&lt;span&gt;VARCHAR&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;100&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  resolution &lt;/span&gt;&lt;span&gt;VARCHAR&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;100&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;CREATE&lt;/span&gt;&lt;span&gt; TABLE&lt;/span&gt;&lt;span&gt; snack_inventory&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  id &lt;/span&gt;&lt;span&gt;INT&lt;/span&gt;&lt;span&gt; PRIMARY KEY&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  snack &lt;/span&gt;&lt;span&gt;VARCHAR&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;100&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  quantity &lt;/span&gt;&lt;span&gt;INT&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;CREATE&lt;/span&gt;&lt;span&gt; TABLE&lt;/span&gt;&lt;span&gt; employee_alibis&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  id &lt;/span&gt;&lt;span&gt;INT&lt;/span&gt;&lt;span&gt; PRIMARY KEY&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  employee &lt;/span&gt;&lt;span&gt;VARCHAR&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;100&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  alibi &lt;/span&gt;&lt;span&gt;VARCHAR&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;200&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, add a little evidence:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;INSERT INTO&lt;/span&gt;&lt;span&gt; case_open &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Greek yogurt'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'The new intern'&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  (&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Leftover pizza'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Anyone working past 6 PM'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;INSERT INTO&lt;/span&gt;&lt;span&gt; case_closed &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Turkey sandwich'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Owner ate it and forgot'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;INSERT INTO&lt;/span&gt;&lt;span&gt; snack_inventory &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Sea salt chips'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;14&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  (&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Emergency chocolate'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;INSERT INTO&lt;/span&gt;&lt;span&gt; employee_alibis &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Zach'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'In a meeting with twelve witnesses'&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  (&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Neil'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'Claims he has never seen a sandwich'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Back on the Dolt replica, all four tables exist:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;USE&lt;/span&gt;&lt;span&gt; breakroom;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;SHOW TABLES;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;---------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| Tables_in_breakroom |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;---------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| case_closed         |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| case_open           |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| employee_alibis     |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| snack_inventory     |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;---------------------+&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is an important detail: replication table filters apply to row events. MySQL sends DDL such as &lt;code&gt;CREATE TABLE&lt;/code&gt; in query events, so DDL is not filtered. The replica knows that all four tables exist; it has merely been instructed not to gossip about all of their rows.&lt;/p&gt;
&lt;p&gt;Let’s count the rows:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;SELECT&lt;/span&gt;&lt;span&gt; 'case_open'&lt;/span&gt;&lt;span&gt; AS&lt;/span&gt;&lt;span&gt; table_name, &lt;/span&gt;&lt;span&gt;COUNT&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;AS&lt;/span&gt;&lt;span&gt; replicated_rows &lt;/span&gt;&lt;span&gt;FROM&lt;/span&gt;&lt;span&gt; case_open&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;UNION ALL&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;SELECT&lt;/span&gt;&lt;span&gt; 'case_closed'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;COUNT&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;FROM&lt;/span&gt;&lt;span&gt; case_closed&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;UNION ALL&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;SELECT&lt;/span&gt;&lt;span&gt; 'snack_inventory'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;COUNT&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;FROM&lt;/span&gt;&lt;span&gt; snack_inventory&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;UNION ALL&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;SELECT&lt;/span&gt;&lt;span&gt; 'employee_alibis'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;COUNT&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;FROM&lt;/span&gt;&lt;span&gt; employee_alibis;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-----------------+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| table_name      | replicated_rows |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-----------------+-----------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| case_open       |               &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt; |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| case_closed     |               &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| snack_inventory |               &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| employee_alibis |               &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-----------------+-----------------+&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The wildcard filter admitted row changes for &lt;code&gt;case_open&lt;/code&gt; and &lt;code&gt;case_closed&lt;/code&gt; and skipped the other two tables. Neil’s alibi has been filtered out, which may be for the best.&lt;/p&gt;
&lt;h2 id="dolt-version-control"&gt;Dolt Version Control&lt;a class="anchor-link" aria-label="Link to heading" href="#dolt-version-control"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Because the replica is Dolt, the replicated transactions also create versioned history. By default, Dolt creates a new commit as each source transaction is applied, and the commit message records the source GTID. We can see the latest two replicated transactions in &lt;code&gt;dolt_log&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;SELECT&lt;/span&gt;&lt;span&gt; LEFT&lt;/span&gt;&lt;span&gt;(commit_hash, &lt;/span&gt;&lt;span&gt;8&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;AS&lt;/span&gt;&lt;span&gt; commit_hash, &lt;/span&gt;&lt;span&gt;message&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;FROM&lt;/span&gt;&lt;span&gt; dolt_log&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;LIMIT&lt;/span&gt;&lt;span&gt; 2&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-------------+-------------------------------------------------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| commit_hash | &lt;/span&gt;&lt;span&gt;message&lt;/span&gt;&lt;span&gt;                                                                 |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-------------+-------------------------------------------------------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| dp5f0jhp    | Dolt binlog &lt;/span&gt;&lt;span&gt;replica&lt;/span&gt;&lt;span&gt; commit&lt;/span&gt;&lt;span&gt;: GTID 614fa9ba&lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;b5e2&lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;11f1&lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;9b3e&lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;274e157c3285:&lt;/span&gt;&lt;span&gt;9&lt;/span&gt;&lt;span&gt; |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| 47e7htpp    | Dolt binlog &lt;/span&gt;&lt;span&gt;replica&lt;/span&gt;&lt;span&gt; commit&lt;/span&gt;&lt;span&gt;: GTID 614fa9ba&lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;b5e2&lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;11f1&lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;9b3e&lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;274e157c3285:&lt;/span&gt;&lt;span&gt;8&lt;/span&gt;&lt;span&gt; |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-------------+-------------------------------------------------------------------------+&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Your commit hashes and source UUID will be different, but the messages will identify the source transaction behind each commit. That history is queryable data, not a stack of opaque binlog files.&lt;/p&gt;
&lt;p&gt;When investigating a change, we can start with &lt;code&gt;dolt_diff_stat()&lt;/code&gt; to see which tables changed between two commits and how many rows were added, deleted, or modified. Here we compare the latest commit with its parent:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;SELECT&lt;/span&gt;&lt;span&gt; table_name, rows_added, rows_deleted, rows_modified&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;FROM&lt;/span&gt;&lt;span&gt; dolt_diff_stat(&lt;/span&gt;&lt;span&gt;'HEAD~'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'HEAD'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-------------+------------+--------------+---------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| table_name  | rows_added | rows_deleted | rows_modified |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-------------+------------+--------------+---------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| case_closed |          &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; |            &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; |             &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-------------+------------+--------------+---------------+&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The stats point us to &lt;code&gt;case_closed&lt;/code&gt;, where one row was added. Now we can use &lt;code&gt;dolt_diff()&lt;/code&gt; with the same two commits to see the exact change:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;SELECT&lt;/span&gt;&lt;span&gt; diff_type, to_id, to_missing_lunch, to_resolution&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;FROM&lt;/span&gt;&lt;span&gt; dolt_diff(&lt;/span&gt;&lt;span&gt;'HEAD~'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'HEAD'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'case_closed'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-----------+-------+------------------+-------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| diff_type | to_id | to_missing_lunch | to_resolution           |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-----------+-------+------------------+-------------------------+&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;| added     |     &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; | Turkey sandwich  | &lt;/span&gt;&lt;span&gt;Owner&lt;/span&gt;&lt;span&gt; ate it &lt;/span&gt;&lt;span&gt;and&lt;/span&gt;&lt;span&gt; forgot |&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt;-----------+-------+------------------+-------------------------+&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The lunch thief remains at large, but now every case update leaves a versioned trail. We may not have a culprit yet, but sooner or later, somebody is going to get caught bread-handed.&lt;/p&gt;
&lt;h2 id="choosing-the-right-filter"&gt;Choosing the Right Filter&lt;a class="anchor-link" aria-label="Link to heading" href="#choosing-the-right-filter"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Use a wildcard &lt;code&gt;DO&lt;/code&gt; filter when the replica should receive only a named family of tables:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;CHANGE REPLICATION &lt;/span&gt;&lt;span&gt;FILTER&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  REPLICATE_WILD_DO_TABLE &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;'sales.orders%'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Use a wildcard &lt;code&gt;IGNORE&lt;/code&gt; filter when the replica should receive everything except a named family:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;CHANGE REPLICATION &lt;/span&gt;&lt;span&gt;FILTER&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  REPLICATE_WILD_IGNORE_TABLE &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;'sales.scratch%'&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Be careful when combining filter types. MySQL-compatible table-filter precedence is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;An exact &lt;code&gt;DO&lt;/code&gt; match replicates the row.&lt;/li&gt;
&lt;li&gt;An exact &lt;code&gt;IGNORE&lt;/code&gt; match skips it.&lt;/li&gt;
&lt;li&gt;A wildcard &lt;code&gt;DO&lt;/code&gt; match replicates it.&lt;/li&gt;
&lt;li&gt;A wildcard &lt;code&gt;IGNORE&lt;/code&gt; match skips it.&lt;/li&gt;
&lt;li&gt;If any &lt;code&gt;DO&lt;/code&gt; rules exist, an unmatched row is skipped; otherwise it is replicated.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The early match wins. In particular, a broad wildcard &lt;code&gt;DO&lt;/code&gt; pattern cannot be narrowed with an overlapping wildcard &lt;code&gt;IGNORE&lt;/code&gt; pattern, because the wildcard &lt;code&gt;DO&lt;/code&gt; rule is checked first. If you want everything except &lt;code&gt;scratch%&lt;/code&gt;, use the wildcard &lt;code&gt;IGNORE&lt;/code&gt; rule by itself.&lt;/p&gt;
&lt;p&gt;One other operational detail worth remembering: filters affect new row events; they do not remove data already present on the replica, so an initial snapshot must be scoped appropriately.&lt;/p&gt;
&lt;h2 id="wrapping-up"&gt;Wrapping Up&lt;a class="anchor-link" aria-label="Link to heading" href="#wrapping-up"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Wildcard binlog filters make it easier to build focused Dolt replicas for analytics, audit history, staged migrations, and service-specific read workloads. You can select whole families of tables without maintaining an ever-growing list of exact table names, while the replicated data still gets the benefits of Dolt’s versioned history.&lt;/p&gt;
&lt;p&gt;This feature exists because a user told us about a gap that mattered in their deployment. We love getting reports like that. If you hit a missing feature, compatibility gap, or bug, please &lt;a href="https://github.com/dolthub/dolt/issues/new"&gt;open an issue on GitHub&lt;/a&gt; or &lt;a href="https://discord.gg/gqr7K4VNKe"&gt;come talk to us on Discord&lt;/a&gt;. User bug reports and feature requests help us understand what matters to real systems, and sometimes we can get a fix into your hands before your lunch disappears again.&lt;/p&gt;</content:encoded>
      <dc:creator>Jason Fulghum</dc:creator>
      <category>feature release</category>
      <category>dolt</category>
    </item>
    <item>
      <title>DumboDB: Announcing Replication V1</title>
      <link>https://dolthub.com/blog/2026-09-22-dumbodb-replication/</link>
      <guid isPermaLink="true">https://dolthub.com/blog/2026-09-22-dumbodb-replication/</guid>
      <description>MongoDB and Git had a baby, and it's named Dumbo. Now you can replicate updates from MongoDB into Dumbo!</description>
      <pubDate>Tue, 22 Sep 2026 00:00:00 GMT</pubDate>
      <content:encoded>&lt;p&gt;&lt;img src="https://static.dolthub.com/blogimages/dumbo-logo.png/c02da7b39168585c4dc1adf3ebf6ffe77404dd9b8fc5a35f6dc765bb9dea9e16.webp" alt="DumboDB Logo"&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/dolthub/dumbodb"&gt;DumboDB&lt;/a&gt; is what you get when
&lt;a href="https://github.com/mongodb/mongo"&gt;MongoDB&lt;/a&gt; and
&lt;a href="https://github.com/git/git"&gt;Git&lt;/a&gt; have a baby. Every document in
your database now has a revision history, similar to how you track versions of your source
code. It’s Git for your documents. The &lt;a href="https://en.wikipedia.org/wiki/Merkle_tree"&gt;Merkle DAG&lt;/a&gt;
of Git allows for branching and merging, while
document-based applications continue to use the familiar MongoDB ecosystem to query
and update data.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.dolthub.com/"&gt;DoltHub&lt;/a&gt;’s first and most mature product is
&lt;a href="https://github.com/dolthub/dolt"&gt;Dolt&lt;/a&gt;, which is
what happens when MySQL and Git have a baby. One of the ways in which Dolt participates
in the MySQL ecosystem is by supporting
&lt;a href="https://www.dolthub.com/docs/guides/binlog-replication/"&gt;binlog replication&lt;/a&gt;, which
enables MySQL operators to see fine-grained operations on their data, with each source
transaction recorded as a &lt;a href="https://www.dolthub.com/docs/guides/binlog-replication/"&gt;Dolt commit&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The use case translates very easily to MongoDB. MongoDB supports a replication system that
has been battle-tested for a long time. MongoDB
&lt;a href="https://www.mongodb.com/docs/manual/replication/"&gt;replica sets&lt;/a&gt; are used to move data
between hosts for redundancy and resiliency. Until today, DumboDB had no ability to
participate in a MongoDB replica set.&lt;/p&gt;
&lt;p&gt;Today we announce the ability for DumboDB to participate in a MongoDB replica set as a
change sink. This allows MongoDB operators and testers the ability to get a fine-grained
log of changes in their database in the form of the DumboDB commit log. Let’s dive in!&lt;/p&gt;
&lt;h2 id="mongodb-replication"&gt;MongoDB Replication&lt;a class="anchor-link" aria-label="Link to heading" href="#mongodb-replication"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;MongoDB replication is one of the reasons people think of MongoDB as “Web Scale.”&lt;/p&gt;

&lt;p&gt;Jokes aside, for MongoDB, it’s &lt;a href="https://www.mongodb.com/docs/manual/replication/"&gt;fairly trivial&lt;/a&gt; to add more read capacity and increase
availability with fail over options using replica sets. This is all built into the server
and doesn’t depend on Kubernetes or containers.&lt;/p&gt;
&lt;p&gt;At a high level, there are peers in the network, some of which have “voting” ability. These
votes are used to assure quorum when doing primary election and so forth.&lt;/p&gt;
&lt;p&gt;If you’re wondering whether that’s &lt;a href="https://en.wikipedia.org/wiki/Gossip_protocol"&gt;gossip&lt;/a&gt; or something more formal, it’s the latter:
MongoDB’s replication is closer to &lt;a href="https://raft.github.io/"&gt;Raft&lt;/a&gt; than to a gossip
protocol, though it isn’t Raft exactly. Every member heartbeats every other member, and
when the primary stops answering, the remaining voters hold an election. The winner earns
a &lt;em&gt;term&lt;/em&gt;, a number that only ever goes up and gets stamped on every write it accepts
afterwards. Terms are what make a zombie primary harmless: anything it wrote carries an
older term, so instead of being accepted, it gets rolled back.&lt;/p&gt;
&lt;p&gt;One interesting divergence from Raft is that the log flows the other way. Rather than the
primary pushing entries out to its followers, each secondary tails the primary’s
&lt;code&gt;local.oplog.rs&lt;/code&gt; collection and pulls what it needs. That’s also why a secondary can sync
from another secondary rather than always from the primary. There is a good deal more
under the hood here, and
MongoDB’s &lt;a href="https://www.mongodb.com/docs/manual/replication/"&gt;replication documentation&lt;/a&gt;
is the place to go for the full picture.&lt;/p&gt;
&lt;h3 id="dumbodb-as-a-replica"&gt;DumboDB as a Replica&lt;a class="anchor-link" aria-label="Link to heading" href="#dumbodb-as-a-replica"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Each host that participates in the replica set can join at varying levels of participation.
DumboDB exploits this fact by only allowing itself to participate as a non-voting, hidden
member with a priority of zero, which means it can never be elected primary, never counts
toward the quorum that acknowledges a write, and never shows up to clients discovering the
set. It reads the oplog like any other secondary, and is otherwise invisible to everyone.&lt;/p&gt;
&lt;p&gt;Participating as a full member of a MongoDB replica set or enabling full replica support
in DumboDB
isn’t currently planned, but we love
&lt;a href="https://github.com/dolthub/dumbodb/issues"&gt;hearing from our users&lt;/a&gt; if that’s something
that would interest you!&lt;/p&gt;
&lt;h3 id="no-authentication-yet"&gt;No Authentication, Yet&lt;a class="anchor-link" aria-label="Link to heading" href="#no-authentication-yet"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;One major limitation DumboDB has currently is that replication is not supported in an
environment where &lt;code&gt;--auth&lt;/code&gt; is enabled. This also includes TLS transports, since these go
hand in hand. Support will be added in future releases!&lt;/p&gt;
&lt;h2 id="example"&gt;Example&lt;a class="anchor-link" aria-label="Link to heading" href="#example"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We’ll set up a MongoDB and DumboDB instance to demonstrate how updates in your MongoDB server
can be read in the commit log of DumboDB. Setup is a little involved, mainly because you
need both a MongoDB instance and a DumboDB instance running to see the magic. We’ll take it
slow!&lt;/p&gt;
&lt;h3 id="run-an-80x-version-of-mongodb"&gt;Run an 8.0.x Version of MongoDB&lt;a class="anchor-link" aria-label="Link to heading" href="#run-an-80x-version-of-mongodb"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If you don’t already have one, grab the MongoDB Community Server from the
&lt;a href="https://www.mongodb.com/try/download/community"&gt;download page&lt;/a&gt;, or follow the
&lt;a href="https://www.mongodb.com/docs/manual/installation/"&gt;installation guide&lt;/a&gt; for your
platform. You’ll want the &lt;a href="https://www.mongodb.com/try/download/shell"&gt;&lt;code&gt;mongosh&lt;/code&gt; shell&lt;/a&gt;
too, which is a separate download.&lt;/p&gt;
&lt;p&gt;Everything below was run against &lt;code&gt;mongod 8.0.28&lt;/code&gt;. Start it as a single-member replica
set. Open a terminal and let this one run:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="bash"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mkdir&lt;/span&gt;&lt;span&gt; -p&lt;/span&gt;&lt;span&gt; /tmp/demo/mongo&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;mongod&lt;/span&gt;&lt;span&gt; --replSet&lt;/span&gt;&lt;span&gt; rs0&lt;/span&gt;&lt;span&gt; --port&lt;/span&gt;&lt;span&gt; 27017&lt;/span&gt;&lt;span&gt; --dbpath&lt;/span&gt;&lt;span&gt; /tmp/demo/mongo&lt;/span&gt;&lt;span&gt; \&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;       --bind_ip&lt;/span&gt;&lt;span&gt; 127.0.0.1&lt;/span&gt;&lt;span&gt; --nounixsocket&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Connect to the MongoDB instance with &lt;code&gt;mongosh&lt;/code&gt;, on the default port:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="bash"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;$&lt;/span&gt;&lt;span&gt; mongosh&lt;/span&gt;&lt;span&gt; mongodb://localhost&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then initiate the set with MongoDB alone in it. DumboDB joins in a moment.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="javascript"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;rs0 [direct: other] test&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; rs.&lt;/span&gt;&lt;span&gt;initiate&lt;/span&gt;&lt;span&gt;({ &lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;         _id: &lt;/span&gt;&lt;span&gt;"rs0"&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;         members: [ { _id: &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, host: &lt;/span&gt;&lt;span&gt;"127.0.0.1:27017"&lt;/span&gt;&lt;span&gt; } ] &lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;})&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;{ &lt;/span&gt;&lt;span&gt;ok&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Since there are no other members of the replica set, this host will become the primary
quickly. You can check it with:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="javascript"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;rs0 [direct: primary] test&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; rs.&lt;/span&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt;().myState&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;                                              // Primary&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It is worth calling out the shell prompt, &lt;code&gt;rs0 [direct: primary] test&gt;&lt;/code&gt;, and how it changed
from &lt;code&gt;other&lt;/code&gt; to &lt;code&gt;primary&lt;/code&gt;. That prompt appears in the examples below and indicates we are
connected to MongoDB (&lt;code&gt;primary&lt;/code&gt;) or DumboDB (&lt;code&gt;secondary&lt;/code&gt;).&lt;/p&gt;
&lt;h3 id="run-a-064-instance-of-dumbodb"&gt;Run a 0.6.4 Instance of DumboDB&lt;a class="anchor-link" aria-label="Link to heading" href="#run-a-064-instance-of-dumbodb"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Grab the &lt;a href="https://github.com/dolthub/dumbodb/releases/tag/v0.6.4"&gt;v0.6.4 release&lt;/a&gt;. Any
earlier version will not support this demo! We publish pre-built binaries for
Linux, MacOS and Windows on the
&lt;a href="https://github.com/dolthub/dumbodb/releases"&gt;releases page&lt;/a&gt;; drop the one for your
platform somewhere on your &lt;code&gt;PATH&lt;/code&gt;. There’s a Docker image and build-from-source
instructions in the &lt;a href="https://github.com/dolthub/dumbodb#quick-start"&gt;README&lt;/a&gt; if you
prefer either of those.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;--replSet&lt;/code&gt; flag is what puts DumboDB in replica mode. Without it you get an
ordinary standalone DumboDB server.&lt;/p&gt;
&lt;p&gt;Open a second terminal for this one and leave it running too:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="bash"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;mkdir&lt;/span&gt;&lt;span&gt; -p&lt;/span&gt;&lt;span&gt; /tmp/demo/dumbo&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;dumbodb&lt;/span&gt;&lt;span&gt; --replSet&lt;/span&gt;&lt;span&gt; rs0&lt;/span&gt;&lt;span&gt; --addr&lt;/span&gt;&lt;span&gt; 127.0.0.1:27018&lt;/span&gt;&lt;span&gt; --data-dir&lt;/span&gt;&lt;span&gt; /tmp/demo/dumbo&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="join-the-replica-set"&gt;Join the Replica Set&lt;a class="anchor-link" aria-label="Link to heading" href="#join-the-replica-set"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;DumboDB joins as a hidden, non-voting, priority-zero member. All three matter, and
DumboDB refuses to replicate without them. Using the &lt;code&gt;mongosh&lt;/code&gt; shell connected to the
primary server:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="javascript"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;rs0 [direct: primary] test&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; cfg &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; rs.&lt;/span&gt;&lt;span&gt;conf&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;rs0 [direct: primary] test&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; cfg.version &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; cfg.version &lt;/span&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt; 1&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;rs0 [direct: primary] test&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; cfg.members.&lt;/span&gt;&lt;span&gt;push&lt;/span&gt;&lt;span&gt;( {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;     _id: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,                        &lt;/span&gt;&lt;span&gt;// must be unique within the set&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;     host: &lt;/span&gt;&lt;span&gt;"127.0.0.1:27018"&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;     hidden: &lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;,                  &lt;/span&gt;&lt;span&gt;// invisible to client discovery&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;     priority: &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;,                   &lt;/span&gt;&lt;span&gt;// never eligible to become primary&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;     votes: &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;                       // never counted for quorum&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;})&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;rs0 [direct: primary] test&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; rs.&lt;/span&gt;&lt;span&gt;reconfig&lt;/span&gt;&lt;span&gt;(cfg)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;{ &lt;/span&gt;&lt;span&gt;ok&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can see that the mechanism for this configuration uses a
&lt;a href="https://en.wikipedia.org/wiki/Compare-and-swap"&gt;compare and set&lt;/a&gt; on the
version number of the original configuration. We read the existing configuration, then push
the details for the DumboDB instance - keyed by its &lt;code&gt;_id&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Careful:&lt;/strong&gt; Both &lt;code&gt;_id&lt;/code&gt; and &lt;code&gt;host&lt;/code&gt; have to be unique within the set, but MongoDB
enforces them differently. A duplicate &lt;code&gt;_id&lt;/code&gt;, or a &lt;code&gt;host&lt;/code&gt; that exactly matches another
member’s, is rejected outright. The &lt;code&gt;host&lt;/code&gt; check is a string comparison though, so be
careful to not mix up equivalent endpoints, like &lt;code&gt;localhost:27018&lt;/code&gt; and
&lt;code&gt;127.0.0.1:27018&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;After a few seconds, both members report in:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="javascript"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;rs0 [direct: primary] test&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; rs.&lt;/span&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt;().members.&lt;/span&gt;&lt;span&gt;map&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;m&lt;/span&gt;&lt;span&gt; =&gt;&lt;/span&gt;&lt;span&gt; [m.name, m.stateStr])&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  [ &lt;/span&gt;&lt;span&gt;'127.0.0.1:27017'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'PRIMARY'&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  [ &lt;/span&gt;&lt;span&gt;'127.0.0.1:27018'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'SECONDARY'&lt;/span&gt;&lt;span&gt; ]&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="write-to-mongodb-read-from-dumbodb"&gt;Write to MongoDB, Read from DumboDB&lt;a class="anchor-link" aria-label="Link to heading" href="#write-to-mongodb-read-from-dumbodb"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;All writes happen on the MongoDB primary. DumboDB is never written to
directly; in fact it will refuse, exactly like a real secondary. From
the &lt;code&gt;mongosh&lt;/code&gt; you have connected to the primary (note the prompt string), add two
new documents to the &lt;code&gt;items&lt;/code&gt; collection. In normal MongoDB behavior, this will
be created with default settings as needed:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="javascript"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;rs0 [direct: primary] test&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; use shop&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;rs0 [direct: primary] shop&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; db.items.&lt;/span&gt;&lt;span&gt;insertMany&lt;/span&gt;&lt;span&gt;([&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;     { _id: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, name: &lt;/span&gt;&lt;span&gt;"widget"&lt;/span&gt;&lt;span&gt;, qty: &lt;/span&gt;&lt;span&gt;10&lt;/span&gt;&lt;span&gt; },&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;     { _id: &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;, name: &lt;/span&gt;&lt;span&gt;"gadget"&lt;/span&gt;&lt;span&gt;, qty: &lt;/span&gt;&lt;span&gt;20&lt;/span&gt;&lt;span&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;])&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  acknowledged&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  insertedIds&lt;/span&gt;&lt;span&gt;: { &lt;/span&gt;&lt;span&gt;'0'&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'1'&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then change one of them, so there is some history to look at:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="javascript"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;rs0 [direct: primary] shop&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; db.items.&lt;/span&gt;&lt;span&gt;updateOne&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;     { _id: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; },&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;     { $set: { qty: &lt;/span&gt;&lt;span&gt;99&lt;/span&gt;&lt;span&gt; } }&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  acknowledged&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  matchedCount&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  modifiedCount&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Give it a second or two. Now open a fourth terminal, connect &lt;code&gt;mongosh&lt;/code&gt; to DumboDB on
port 27018, and look at the same collection:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="bash"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;$&lt;/span&gt;&lt;span&gt; mongosh&lt;/span&gt;&lt;span&gt; mongodb://localhost:27018&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="javascript"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;rs0 [direct: secondary] test&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; use shop&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;rs0 [direct: secondary] shop&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; db.items.&lt;/span&gt;&lt;span&gt;find&lt;/span&gt;&lt;span&gt;().&lt;/span&gt;&lt;span&gt;sort&lt;/span&gt;&lt;span&gt;({ _id: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; })&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  { _id: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, name: &lt;/span&gt;&lt;span&gt;'widget'&lt;/span&gt;&lt;span&gt;, qty: &lt;/span&gt;&lt;span&gt;99&lt;/span&gt;&lt;span&gt; },     &lt;/span&gt;&lt;span&gt;// the update arrived&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  { _id: &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;, name: &lt;/span&gt;&lt;span&gt;'gadget'&lt;/span&gt;&lt;span&gt;, qty: &lt;/span&gt;&lt;span&gt;20&lt;/span&gt;&lt;span&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="the-part-mongodb-cant-do"&gt;The Part MongoDB Can’t Do&lt;a class="anchor-link" aria-label="Link to heading" href="#the-part-mongodb-cant-do"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Every replication event from MongoDB into DumboDB becomes a commit. &lt;code&gt;dumboLog&lt;/code&gt; is used to
walk the commits and print information about them. Using the &lt;code&gt;patch&lt;/code&gt; flag we can see what
changed:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="javascript"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;rs0 [direct: secondary] shop&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;span&gt; db.&lt;/span&gt;&lt;span&gt;runCommand&lt;/span&gt;&lt;span&gt;({ dumboLog: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, limit: &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;, patch: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; })&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  commits&lt;/span&gt;&lt;span&gt;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      commitId: &lt;/span&gt;&lt;span&gt;'4q7nek16k1sasj1hpu1iunsqab0g5kmt'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      refs: [ &lt;/span&gt;&lt;span&gt;'HEAD'&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;'main'&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      parent1: &lt;/span&gt;&lt;span&gt;'kjgka0tuhe5licg55kp05bffdeb0cb7n'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      message: &lt;/span&gt;&lt;span&gt;'MongoDB replication publication 7ad1ee468c09bbcac9d4360edaeb1287f2f90ed031df25a6a22fa9073a4dc186'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      timestamp: &lt;/span&gt;&lt;span&gt;ISODate&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;'2026-09-21T22:18:31.000Z'&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      author: &lt;/span&gt;&lt;span&gt;'MongoDB Replication &amp;#x3C;replication@dumbodb&gt;'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      committer: &lt;/span&gt;&lt;span&gt;'MongoDB Replication &amp;#x3C;replication@dumbodb&gt;'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      committerTimestamp: &lt;/span&gt;&lt;span&gt;ISODate&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;'2026-09-21T22:18:31.283Z'&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      changes: [&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;        {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;          type: &lt;/span&gt;&lt;span&gt;'collection'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;          name: &lt;/span&gt;&lt;span&gt;'items'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;          status: &lt;/span&gt;&lt;span&gt;'modified'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;          documents: {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;            added: [],&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;            removed: [],&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;            modified: [&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;              {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;                _id: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;                diff: [&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;                  { type: &lt;/span&gt;&lt;span&gt;'modified'&lt;/span&gt;&lt;span&gt;, path: &lt;/span&gt;&lt;span&gt;'$.qty'&lt;/span&gt;&lt;span&gt;, from: &lt;/span&gt;&lt;span&gt;10&lt;/span&gt;&lt;span&gt;, to: &lt;/span&gt;&lt;span&gt;99&lt;/span&gt;&lt;span&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;                ]&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;              }&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;            ]&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;          },&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;          indexes: { added: [], removed: [], modified: [] },&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;          metadata: {}&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      ]&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    },&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      commitId: &lt;/span&gt;&lt;span&gt;'kjgka0tuhe5licg55kp05bffdeb0cb7n'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      parent1: &lt;/span&gt;&lt;span&gt;'1cke6ej1803tmfdoi7s0ii9ii99g4tq2'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      message: &lt;/span&gt;&lt;span&gt;'MongoDB replication publication e15621942dc2b4769bc41f3eca1eb5027b1832ba60c201226846f2e5b8677996'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      timestamp: &lt;/span&gt;&lt;span&gt;ISODate&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;'2026-09-21T22:18:24.000Z'&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      author: &lt;/span&gt;&lt;span&gt;'MongoDB Replication &amp;#x3C;replication@dumbodb&gt;'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      committer: &lt;/span&gt;&lt;span&gt;'MongoDB Replication &amp;#x3C;replication@dumbodb&gt;'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      committerTimestamp: &lt;/span&gt;&lt;span&gt;ISODate&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;'2026-09-21T22:18:24.478Z'&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      changes: [&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;        {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;          type: &lt;/span&gt;&lt;span&gt;'collection'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;          name: &lt;/span&gt;&lt;span&gt;'items'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;          status: &lt;/span&gt;&lt;span&gt;'modified'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;          documents: {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;            added: [&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;              { _id: &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;, name: &lt;/span&gt;&lt;span&gt;'gadget'&lt;/span&gt;&lt;span&gt;, qty: &lt;/span&gt;&lt;span&gt;20&lt;/span&gt;&lt;span&gt; },&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;              { _id: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, name: &lt;/span&gt;&lt;span&gt;'widget'&lt;/span&gt;&lt;span&gt;, qty: &lt;/span&gt;&lt;span&gt;10&lt;/span&gt;&lt;span&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;            ],&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;            removed: [],&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;            modified: []&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;          },&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;          indexes: { added: [], removed: [], modified: [] },&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;          metadata: {}&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;      ]&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  ],&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  next&lt;/span&gt;&lt;span&gt;: [ &lt;/span&gt;&lt;span&gt;'1cke6ej1803tmfdoi7s0ii9ii99g4tq2'&lt;/span&gt;&lt;span&gt; ],&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  ok&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Read that from the top. The newest commit is the &lt;code&gt;updateOne&lt;/code&gt;, and DumboDB recorded it as a
modification to &lt;code&gt;_id: 1&lt;/code&gt; with a field-level diff: &lt;code&gt;$.qty&lt;/code&gt; went &lt;code&gt;from: 10&lt;/code&gt; &lt;code&gt;to: 99&lt;/code&gt;. The
commit before it is the &lt;code&gt;insertMany&lt;/code&gt;, recorded as two added documents.&lt;/p&gt;
&lt;p&gt;And there you have it. We took regular traffic against a MongoDB server, and a read-only
secondary DumboDB instance turned that into an event record for every update to the
primary server. Never scratch your head again about how a document got into the state it’s
in!&lt;/p&gt;
&lt;h2 id="whats-next"&gt;What’s Next&lt;a class="anchor-link" aria-label="Link to heading" href="#whats-next"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As stated above, this feature doesn’t currently support server topologies where
authentication and authorization are enabled. This is obviously a blocker for any
realistic setup, so we will get that addressed before too long. There are also features we
could consider such as applying a diff from a DumboDB server back into your MongoDB
instance, enabling offline work that doesn’t stay trapped in your DumboDB replica.&lt;/p&gt;
&lt;p&gt;What would you like us to work on in the realm of version controlled databases? Come
nerd out with us on our &lt;a href="https://discord.gg/gqr7K4VNKe"&gt;Discord&lt;/a&gt; server!&lt;/p&gt;</content:encoded>
      <dc:creator>Neil Macneale</dc:creator>
      <category>dumbo</category>
      <category>feature release</category>
    </item>
    <item>
      <title>So you want an MCP Database?</title>
      <link>https://dolthub.com/blog/2026-09-16-mcp-database/</link>
      <guid isPermaLink="true">https://dolthub.com/blog/2026-09-16-mcp-database/</guid>
      <description>Explore what an MCP database is and whether Dolt, Supabase, or Neon works best as your MCP database.</description>
      <pubDate>Wed, 16 Sep 2026 00:00:00 GMT</pubDate>
      <content:encoded>&lt;p&gt;Dolt is the database for agents. I’ve been talking about this &lt;a href="https://www.dolthub.com/blog/2025-03-17-dolt-agentic-workflows/"&gt;since March 2025&lt;/a&gt;. The &lt;a href="https://www.dolthub.com/blog/2025-09-08-agentic-ai-three-pillars/"&gt;three pillars of agentic workflows&lt;/a&gt; are a capable model, version control, and tests. Dolt provides version control on your database, the storage layer for almost everything in your enterprise. Use Dolt if you want to bring the success of agentic coding to other places in your enterprise. Agents use the Model Context Protocol (MCP). Is Dolt the MCP Database?&lt;/p&gt;
&lt;p&gt;Traditionally, we’ve tried to rank organically on Google through our &lt;a href="https://www.dolthub.com/blog/?q=So+you+want"&gt;So you want…&lt;/a&gt; series. Over the past year, we have spent a bit of money on advertising, targeting a handful of AI search queries. A well-performing search query for us is &lt;a href="https://www.google.com/search?q=mcp+database"&gt;“MCP database”&lt;/a&gt;. I was a bit baffled by this so I checked out the organic results. The results were lackluster, led by &lt;a href="http://www.mcpdb.com/"&gt;mcpdb.com&lt;/a&gt;, which definitely has nothing to do with &lt;a href="https://en.wikipedia.org/wiki/Model_Context_Protocol"&gt;Model Context Protocol&lt;/a&gt;. Big win for &lt;a href="https://www.atomicmassgames.com/mcp/"&gt;Marvel Crisis Protocol&lt;/a&gt;. This article is my attempt to rectify that injustice.&lt;/p&gt;
&lt;p&gt;What is an MCP Database? This article sets out to answer that question.&lt;/p&gt;
&lt;h1 id="what-is-mcp"&gt;What is MCP?&lt;a class="anchor-link" aria-label="Link to heading" href="#what-is-mcp"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;MCP stands for &lt;a href="https://en.wikipedia.org/wiki/Model_Context_Protocol"&gt;Model Context Protocol&lt;/a&gt;. MCP was &lt;a href="https://www.anthropic.com/news/model-context-protocol"&gt;introduced by Anthropic&lt;/a&gt; very early in the Claude agentic coding revolution. MCP defines a simple HTTP-based standard for exposing tools to Claude and, now, other agents. Tools are actions an agent can take. Book this reservation. Search the web for this. Run this SQL query. MCP became all the rage in Q2 2025 as Claude finally crossed a critical usability threshold. Every service got an MCP server so it could work better with Claude.&lt;/p&gt;
&lt;p&gt;However, MCP was mostly a 2025 concept. Over the back half of 2025, Claude and other agents became very good at operating the command-line interfaces (CLIs) humans use, obviating the need for a special agent interface. CLIs are critical for agentic coding so the model companies put a lot of effort into making their agents good at using them. Thus, MCP servers had their moment but modern agents seem to prefer the same CLIs humans use.&lt;/p&gt;
&lt;h1 id="what-is-a-database"&gt;What is a Database?&lt;a class="anchor-link" aria-label="Link to heading" href="#what-is-a-database"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A database is a repository of structured data. A database can refer to the data inside the database (e.g., the Internet Movie Database, IMDb) or the actual tool storing the data (e.g., MySQL). Carnegie Mellon’s &lt;a href="https://dbdb.io/"&gt;Database of Databases&lt;/a&gt; illustrates both meanings.&lt;/p&gt;
&lt;h1 id="what-is-an-mcp-database"&gt;What is an MCP Database?&lt;a class="anchor-link" aria-label="Link to heading" href="#what-is-an-mcp-database"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;So when a person is searching for MCP database, do they mean a queryable list of MCP servers? Or do they mean the MCP/database combination that works best?&lt;/p&gt;
&lt;h2 id="queryable-list"&gt;Queryable List&lt;a class="anchor-link" aria-label="Link to heading" href="#queryable-list"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you’re looking for a queryable list of MCP servers, Anthropic hosts &lt;a href="https://github.com/modelcontextprotocol/servers"&gt;a GitHub repository&lt;/a&gt; with reference implementations. That repository links to &lt;a href="https://registry.modelcontextprotocol.io/"&gt;an MCP Registry&lt;/a&gt;. The problem with this registry is you can only search by name. I found a couple of competing registries that let you filter by category: &lt;a href="https://mcpmarket.com/categories/database-management"&gt;MCPMarket&lt;/a&gt; and &lt;a href="https://mcpservers.org/category/database"&gt;MCPServers.org&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you’re looking for an MCP server, I bet the tool you want to connect to has one. It might be better to just search for the tool’s name followed by “mcp server”. &lt;a href="https://www.google.com/search?q=dolt+mcp+server"&gt;Here are the results&lt;/a&gt; for “dolt mcp server”. I’m not certain why anyone would want the browsing experience of a registry in this case.&lt;/p&gt;
&lt;h1 id="the-best-database-for-mcp"&gt;The Best Database for MCP&lt;a class="anchor-link" aria-label="Link to heading" href="#the-best-database-for-mcp"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;So, I’m pretty sure people searching for “MCP database” want to know which database works best with an MCP server. Here, I have some opinions. What should you look for in an MCP database?&lt;/p&gt;
&lt;h2 id="1-known-api"&gt;1. Known API&lt;a class="anchor-link" aria-label="Link to heading" href="#1-known-api"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You should choose a database with a known API. For SQL databases, I would stick to the standard open source flavors: Postgres, MySQL, or SQLite. I would not choose an MCP database with a custom API.&lt;/p&gt;
&lt;h2 id="2-well-tested"&gt;2. Well Tested&lt;a class="anchor-link" aria-label="Link to heading" href="#2-well-tested"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Again, stick to the well-trodden path. You want an MCP server and database from a reputable source. Prefer the database’s own supported MCP server over a third-party variant.&lt;/p&gt;
&lt;h2 id="3-easy-to-deploy"&gt;3. Easy to Deploy&lt;a class="anchor-link" aria-label="Link to heading" href="#3-easy-to-deploy"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is where you will start to see some differences among MCP offerings. The standard way to run MCP servers is as a separate process that acts as a bridge between your database and agents. I would prefer an MCP server that shipped with the database itself, not as a separate service. Then, you only need to run one server that serves standard clients and MCP clients, usually on different ports.&lt;/p&gt;
&lt;h2 id="4-write-safety"&gt;4. Write Safety&lt;a class="anchor-link" aria-label="Link to heading" href="#4-write-safety"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is the big one. Agents are known for making catastrophic mistakes, &lt;a href="https://www.dolthub.com/blog/2026-05-04-database-insurance/"&gt;especially with databases&lt;/a&gt;. You are going to want to adopt a database that can restrict or isolate MCP-generated operations. Ideally, you want a database that allows your MCP server to support safe agentic writes.&lt;/p&gt;
&lt;p&gt;The first method to do this is permissions. Restrict the permissions of the MCP server’s database user, or disable write operations entirely. The supported Postgres MCP server shipped without write access initially. Most databases will support this method of write safety.&lt;/p&gt;
&lt;p&gt;The better way to do this is to create a write sandbox. A new generation of &lt;a href="https://www.dolthub.com/blog/2021-09-17-database-version-control/"&gt;version-controlled databases&lt;/a&gt; exists that allows you to create branches for write isolation. You should pick one of these for your MCP database.&lt;/p&gt;
&lt;p&gt;Let’s walk through them.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://static.dolthub.com/blogimages/mcp-databases.png/6a6f2f7b42052bc0424de7f3377948278edb362bb524cfa7bdb8a0f9edfb51a0.webp" alt="MCP Databases"&gt;&lt;/p&gt;
&lt;h3 id="neon"&gt;&lt;a href="https://neon.tech/"&gt;Neon&lt;/a&gt;&lt;a class="anchor-link" aria-label="Link to heading" href="#neon"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;dl&gt;
  &lt;dt&gt;Tagline&lt;/dt&gt;
  &lt;dd&gt;Serverless Postgres&lt;/dd&gt;
  &lt;dt&gt;Initial Release&lt;/dt&gt;
  &lt;dd&gt;June 2021&lt;/dd&gt;
  &lt;dt&gt;GitHub&lt;/dt&gt;
  &lt;dd&gt;&lt;a href="https://github.com/neondatabase/neon"&gt;https://github.com/neondatabase/neon&lt;/a&gt;&lt;/dd&gt;
  &lt;dt&gt;SQL Flavor&lt;/dt&gt;
  &lt;dd&gt;Postgres&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Neon is a very popular open-source Postgres variant. Neon separates storage and compute and substitutes the PostgreSQL storage layer by redistributing data across a cluster of nodes on a copy-on-write filesystem. Neon is the default database for the popular App Builders, &lt;a href="https://www.dolthub.com/blog/2025-10-15-replit-works-with-dolt/"&gt;Replit&lt;/a&gt; and &lt;a href="https://www.dolthub.com/blog/2025-10-01-vercel-v0-works-with-dolt/"&gt;Vercel&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Neon supports &lt;a href="https://neon.tech/docs/introduction/branching"&gt;branches&lt;/a&gt; using &lt;a href="https://medium.com/axial-engineering/instant-per-branch-databases-with-postgresql-18s-clone-file-copy-and-copy-on-write-filesystems-1b1930bddbaa"&gt;Postgres’ copy-on-write functionality&lt;/a&gt;. This method does not allow for diff or merge so these “branches” are &lt;a href="https://www.dolthub.com/blog/2024-09-18-database-branches/"&gt;more aptly called forks&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Neon has &lt;a href="https://neon.com/docs/ai/neon-mcp-server"&gt;an official MCP server&lt;/a&gt; that supports write operations on branches. However, the MCP server is a separate product. This is my third choice for an MCP database.&lt;/p&gt;
&lt;h3 id="supabase"&gt;&lt;a href="https://supabase.com/"&gt;Supabase&lt;/a&gt;&lt;a class="anchor-link" aria-label="Link to heading" href="#supabase"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;dl&gt;
  &lt;dt&gt;Tagline&lt;/dt&gt;
  &lt;dd&gt;The Postgres development platform.&lt;/dd&gt;
  &lt;dt&gt;Initial Release&lt;/dt&gt;
  &lt;dd&gt;May 2020&lt;/dd&gt;
  &lt;dt&gt;GitHub&lt;/dt&gt;
  &lt;dd&gt;&lt;a href="https://github.com/supabase/supabase"&gt;https://github.com/supabase/supabase&lt;/a&gt;&lt;/dd&gt;
  &lt;dt&gt;SQL Flavor&lt;/dt&gt;
  &lt;dd&gt;Postgres&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Supabase is the fastest growing database on the planet. To say it’s a database is a bit of an understatement. It starts as Postgres and then layers on a bunch of best-of-breed open source Postgres tools to give you more of a “backend in a box”. One of the included tools is an MCP server. Like Neon, Supabase also supports Postgres’ copy-on-write “branches”… er, forks.&lt;/p&gt;
&lt;p&gt;Because of the built-in MCP server, I would prefer this solution to Neon, making Supabase my second choice as an MCP database.&lt;/p&gt;
&lt;h3 id="dolt"&gt;&lt;a href="https://www.dolthub.com"&gt;Dolt&lt;/a&gt;&lt;a class="anchor-link" aria-label="Link to heading" href="#dolt"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;dl&gt;
  &lt;dt&gt;Tagline&lt;/dt&gt;
  &lt;dd&gt;Git for Data&lt;/dd&gt;
  &lt;dt&gt;Initial Release&lt;/dt&gt;
  &lt;dd&gt;August 2019&lt;/dd&gt;
  &lt;dt&gt;GitHub&lt;/dt&gt;
  &lt;dd&gt;&lt;a href="https://github.com/dolthub/dolt"&gt;https://github.com/dolthub/dolt&lt;/a&gt;&lt;/dd&gt;
  &lt;dt&gt;SQL Flavor&lt;/dt&gt;
  &lt;dd&gt;MySQL, &lt;a href="https://github.com/dolthub/doltgresql"&gt;Postgres&lt;/a&gt;, &lt;a href="https://github.com/dolthub/doltlite"&gt;SQLite&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;I mentioned Dolt in the opening. I’m the CEO of the company that built it so I’m a bit biased.&lt;/p&gt;
&lt;p&gt;Dolt is the world’s only truly version-controlled database. All the version control functionality you know and love from Git is available in Dolt, all with &lt;a href="https://www.dolthub.com/docs/sql-reference/benchmarks/latency/"&gt;the query performance of MySQL or Postgres&lt;/a&gt;. Version control is essential for agentic workloads because agents make mistakes. Give your agent a branch or clone and let them run wild. Merge only if the change is good, just like you are used to with coding agents.&lt;/p&gt;
&lt;p&gt;Dolt ships with &lt;a href="https://www.dolthub.com/blog/2025-09-09-announcing-dolt-sql-server-mcp/"&gt;a built-in MCP server&lt;/a&gt; and full version control delivers best-of-breed write safety. Dolt is my first choice for an MCP database.&lt;/p&gt;
&lt;p&gt;Interested in learning more? Come by &lt;a href="https://discord.gg/gqr7K4VNKe"&gt;our Discord&lt;/a&gt; and I’d be happy to give you a demo.&lt;/p&gt;</content:encoded>
      <dc:creator>Tim Sehn</dc:creator>
      <category>reference</category>
      <category>ai</category>
    </item>
    <item>
      <title>Home and Pricing Page Redesign</title>
      <link>https://dolthub.com/blog/2026-09-15-new-homepage-and-pricing/</link>
      <guid isPermaLink="true">https://dolthub.com/blog/2026-09-15-new-homepage-and-pricing/</guid>
      <description>DoltHub is the version-controlled database company, and our new homepage and pricing page reflect that shift.</description>
      <pubDate>Tue, 15 Sep 2026 00:00:00 GMT</pubDate>
      <content:encoded>&lt;p&gt;&lt;a href="https://www.dolthub.com/blog/2026-07-16-dolt-in-4-flavors/"&gt;Dolt now comes in four flavors&lt;/a&gt;: Dolt, Doltgres, DoltLite and Dumbo. Our redesigned homepage and pricing page reflect that expanded lineup. This article walks through the new designs and highlights some of the messages we’re trying to emphasize.&lt;/p&gt;
&lt;h1 id="homepage"&gt;Homepage&lt;a class="anchor-link" aria-label="Link to heading" href="#homepage"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;DoltHub started as &lt;a href="https://www.dolthub.com/blog/2019-10-09-where-is-the-data-catalog/"&gt;a data sharing company&lt;/a&gt;. We still think DoltHub is great for sharing data but our customers mostly want to run our databases in production instead. Our fastest-growing use case is serving as the backing store for systems where &lt;a href="https://www.dolthub.com/blog/2026-06-04-agentic-writes/"&gt;agents make writes&lt;/a&gt;. Our new homepage reflects that.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.dolthub.com/"&gt;&lt;img src="https://static.dolthub.com/blogimages/new-homepage.png/080e805b65e17d5be2c2c035d173885fa99a55e79f34ca4293a23bfeab69dd50.webp" alt="New Homepage"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A few things to note about this design: the image of agents hanging out on the branches of a tree growing from a database-shaped pot is not new. But it’s one of my favorite images our designers have ever made. It stays. We also wanted to make sure people knew from the start that we are the version-controlled database company and that our databases are perfect for agents. The new above-the-fold language reflects this.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;AGENTS NEED VERSION CONTROL&lt;br&gt;
We Build Databases for Agents&lt;br&gt;
The only databases with version control&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We also wanted to highlight our three non-alpha databases above the fold: Dolt, Doltgres, and DoltLite. Dumbo will be included once it sheds the alpha tag.&lt;/p&gt;
&lt;p&gt;When we only had Dolt, most new folks visiting the homepage would assume Dolt was a MySQL add-on. Now that Dolt comes in four flavors, it’s clearer from the start that our databases are built from the ground up on novel storage to provide Git-style features. The messaging no longer centers on MySQL.&lt;/p&gt;
&lt;p&gt;Clicking on a database in the first section takes you to a card explaining what that database is and when to use it. These cards are my favorite part of the homepage. I think they are the best distillation of what makes each Dolt flavor special.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.dolthub.com/#dolt"&gt;&lt;img src="https://static.dolthub.com/blogimages/new-databases-section.png/0a7e23f056812bb02b8efc2145dbd190a4857415da344fa886fe239fc1083fba.webp" alt="New Databases Section"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also, while you’re down there, &lt;a href="https://github.com/dolthub/doltlite"&gt;throw my baby DoltLite a star&lt;/a&gt;. It’s getting mogged by Dolt and Doltgres.&lt;/p&gt;
&lt;h1 id="pricing"&gt;Pricing&lt;a class="anchor-link" aria-label="Link to heading" href="#pricing"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;We applied lessons from designing the database cards to &lt;a href="https://www.dolthub.com/pricing"&gt;the new pricing page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.dolthub.com/pricing"&gt;&lt;img src="https://static.dolthub.com/blogimages/new-pricing-page.png/40e5fe503e054b42f4681d01640204097e474f5c9247b8437a84a9c958d3cdd0.webp" alt="New Pricing Page"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;All of our databases are free and open source. We wanted to make that clear from the pricing page.&lt;/p&gt;
&lt;p&gt;We make money in two ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Enterprise Support&lt;/li&gt;
&lt;li&gt;Services&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The pricing page explains our services and links to our &lt;a href="https://www.dolthub.com/support"&gt;Enterprise Support page&lt;/a&gt;. I have a few ideas about how we could make paid support a clearer option so come back and refresh the pricing page every once in a while if you are curious.&lt;/p&gt;
&lt;h1 id="conclusion"&gt;Conclusion&lt;a class="anchor-link" aria-label="Link to heading" href="#conclusion"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;How do you like the new homepage and pricing page? Did we accomplish our design goals? Come by &lt;a href="https://discord.gg/gqr7K4VNKe"&gt;our Discord&lt;/a&gt; and give us your feedback.&lt;/p&gt;</content:encoded>
      <dc:creator>Tim Sehn</dc:creator>
      <category>dolthub</category>
    </item>
    <item>
      <title>Postgres follows the SQL standard for UPDATE statements, unlike MySQL</title>
      <link>https://dolthub.com/blog/2026-09-11-postgres-update-statements/</link>
      <guid isPermaLink="true">https://dolthub.com/blog/2026-09-11-postgres-update-statements/</guid>
      <description>Learn how Dolt and Doltgres support different SQL behavior on a shared engine using a new engine extension point</description>
      <pubDate>Fri, 11 Sep 2026 00:00:00 GMT</pubDate>
      <content:encoded>&lt;p&gt;&lt;a href="https://doltgres.com"&gt;Doltgres&lt;/a&gt;, the world’s first version-controlled Postgres-compatible database,
just &lt;a href="https://www.dolthub.com/blog/2026-08-06-doltgres-1-0/"&gt;hit 1.0&lt;/a&gt;, meaning that it’s ready for
production use. We want Doltgres to be a drop-in replacement for Postgres so that customers can use
the entire ecosystem of Postgres-compatible tools and libraries, or port their existing database
application to Doltgres without changing any code. This means getting all the nuanced semantics of
Postgres’s behavior correct in our emulation. And we think we’ve done pretty well here — our
compatibility tests &lt;a href="https://www.doltgres.com/docs/reference/supported-clients/clients/"&gt;encompass over two dozen tools and
languages&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But Doltgres shares the same SQL engine Dolt uses, which was built to emulate MySQL semantics. For
most queries this works fine, but MySQL plays famously fast and loose with the SQL standard, while
Postgres takes it much more seriously. And because we take client compatibility very, very
seriously, that means that we need an engine that &lt;a href="https://www.dolthub.com/blog/2021-06-21-copying-mysqls-dumb-decisions/"&gt;reproduces all of MySQL’s wacky non-standard
behavior&lt;/a&gt; for Dolt and
Postgres’s dignified, correct behavior for Doltgres.&lt;/p&gt;
&lt;p&gt;Today’s blog is a case study of one area where the engine’s behavior differs to match the emulation
target, and a look under the hood for how we manage these differences internally in our interfaces.&lt;/p&gt;
&lt;h1 id="update-with-column-values-from-the-same-row"&gt;UPDATE with column values from the same row&lt;a class="anchor-link" aria-label="Link to heading" href="#update-with-column-values-from-the-same-row"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://github.com/dolthub/doltgresql/issues/3092"&gt;This issue&lt;/a&gt; was brought to our attention by an
early adopter customer: Doltgres had the wrong behavior when an &lt;code&gt;UPDATE&lt;/code&gt; statement referenced table
columns in its update expressions.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;CREATE&lt;/span&gt;&lt;span&gt; TABLE&lt;/span&gt;&lt;span&gt; t_seq&lt;/span&gt;&lt;span&gt; (a &lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt;, b &lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;INSERT INTO&lt;/span&gt;&lt;span&gt; t_seq &lt;/span&gt;&lt;span&gt;VALUES&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;UPDATE&lt;/span&gt;&lt;span&gt; t_seq &lt;/span&gt;&lt;span&gt;SET&lt;/span&gt;&lt;span&gt; a &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; 2&lt;/span&gt;&lt;span&gt;, b &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; CASE&lt;/span&gt;&lt;span&gt; WHEN&lt;/span&gt;&lt;span&gt; a &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; 1&lt;/span&gt;&lt;span&gt; THEN&lt;/span&gt;&lt;span&gt; 100&lt;/span&gt;&lt;span&gt; ELSE&lt;/span&gt;&lt;span&gt; -&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt; END&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;SELECT&lt;/span&gt;&lt;span&gt; a, b &lt;/span&gt;&lt;span&gt;FROM&lt;/span&gt;&lt;span&gt; t_seq;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The SQL standard says that an &lt;code&gt;UPDATE&lt;/code&gt; statement that references column values should use the value
from the pre-update row, in all cases. So the &lt;code&gt;SELECT&lt;/code&gt; query in the above block should return this:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt; a |  b&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;---+-----&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt; 2&lt;/span&gt;&lt;span&gt; | &lt;/span&gt;&lt;span&gt;100&lt;/span&gt;&lt;span&gt;    -- per the SQL standard, every assignment reads the pre-update row&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But MySQL doesn’t behave this way for an &lt;code&gt;UPDATE&lt;/code&gt;. It ignores the SQL standard and uses the new,
updated column values in every &lt;code&gt;UPDATE&lt;/code&gt; expression as it executes them one by one, left to right, on
each row. So in MySQL, and Dolt, the above select returns this:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt; a |  b&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;---+-----&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt; 2&lt;/span&gt;&lt;span&gt; |  &lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;    -- the CASE saw the NEW value of a (=2)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And until earlier this week, Doltgres behaved this way too. But that’s wrong, and breaks client
expectations for Postgres application developers. We needed to change this behavior in the engine,
but only when running in Postgres emulation mode.&lt;/p&gt;
&lt;p&gt;How do we do that?&lt;/p&gt;
&lt;h1 id="introducing-engine-overrides"&gt;Introducing engine overrides&lt;a class="anchor-link" aria-label="Link to heading" href="#introducing-engine-overrides"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;During development of Doltgres, we experimented with a lot of different mechanisms to vary the
engine’s behavior for Doltgres, either to reflect needed differences for Postgres compatibility or
to implement features that MySQL doesn’t have. These include new rules during query analysis, new
plan nodes that wrap or otherwise alter existing ones, as well as more hacky fixes like swapping
function pointers during program init. For something like this divergence in behavior, there wasn’t
an existing extension point in the query engine. We &lt;a href="https://github.com/dolthub/go-mysql-server/blob/main/ARCHITECTURE.md"&gt;designed the
engine&lt;/a&gt; to make the database
backend swappable, as well as some of the query planning logic. But for something as fundamental as
applying updates to a row, we had not bothered to make the behavior pluggable.&lt;/p&gt;
&lt;p&gt;Our current approach in this kind of situation is to provide the engine with a set of well-defined
behavioral extension points at construction. Unlike the interfaces that define tables, databases,
functions, etc. that allow integrators to implement a custom database storage backend, these
extension points alter the query-time behavior of the engine itself, independent of the storage
backend. They’re currently stored in a struct called &lt;code&gt;EngineOverrides&lt;/code&gt;. To solve this particular
problem, we introduced the new &lt;code&gt;UpdateExpressionApplier&lt;/code&gt; interface at the bottom of the struct.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="go"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; EngineOverrides&lt;/span&gt;&lt;span&gt; struct&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	// Builder contains functions and variables that can replace, supplement, or override functionality within the builder.&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	Builder &lt;/span&gt;&lt;span&gt;BuilderOverrides&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	// SchemaFormatter is the formatter for schema string creation. If nil, this will format in MySQL's style.&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	SchemaFormatter &lt;/span&gt;&lt;span&gt;SchemaFormatter&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	// Hooks contain various hooks that are called within a statement's lifecycle.&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	Hooks &lt;/span&gt;&lt;span&gt;ExecutionHooks&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	// CostedIndexScanExpressionFilter is used to walk expression trees in order to apply index scans based on&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	// filter expressions. Some expressions may need to be modified or skipped in order to properly apply indexes&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	// for all integrators.&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	CostedIndexScanExpressionFilter &lt;/span&gt;&lt;span&gt;ExpressionTreeFilter&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	// UpdateExpressionApplier evaluates UPDATE assignments. If nil, the engine uses&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	// MySQL's sequential assignment evaluation and IGNORE conversion handling.&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	UpdateExpressionApplier &lt;/span&gt;&lt;span&gt;UpdateExpressionApplier&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The new interface looks like this:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="go"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;// UpdateExpressionApplier evaluates the assignments for a row in an UPDATE statement.&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;// It does not apply to procedural SET or INSERT ON DUPLICATE KEY UPDATE statements.&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; UpdateExpressionApplier&lt;/span&gt;&lt;span&gt; interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	ApplyRowUpdate&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;ctx&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt;Context&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;updateExprs&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt;UpdateExprs&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;tableSchema&lt;/span&gt;&lt;span&gt; Schema&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;oldRow&lt;/span&gt;&lt;span&gt; Row&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;ignore&lt;/span&gt;&lt;span&gt; bool&lt;/span&gt;&lt;span&gt;) (&lt;/span&gt;&lt;span&gt;Row&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;error&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For MySQL behavior, we have a simple interface that applies updates the same way it always has
(matching MySQL, not Postgres). For Doltgres, we implemented a new one that we plug in at engine
construction time.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="go"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;func&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;UpdateExpressionApplier&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;ApplyRowUpdate&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;ctx&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt;sql&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Context&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;updateExprs&lt;/span&gt;&lt;span&gt; *&lt;/span&gt;&lt;span&gt;sql&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;UpdateExprs&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;tableSchema&lt;/span&gt;&lt;span&gt; sql&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Schema&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;oldRow&lt;/span&gt;&lt;span&gt; sql&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Row&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;_&lt;/span&gt;&lt;span&gt; bool&lt;/span&gt;&lt;span&gt;) (&lt;/span&gt;&lt;span&gt;sql&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Row&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;error&lt;/span&gt;&lt;span&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	newRow &lt;/span&gt;&lt;span&gt;:=&lt;/span&gt;&lt;span&gt; oldRow.&lt;/span&gt;&lt;span&gt;Copy&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;	for&lt;/span&gt;&lt;span&gt; _, expr &lt;/span&gt;&lt;span&gt;:=&lt;/span&gt;&lt;span&gt; range&lt;/span&gt;&lt;span&gt; updateExprs.&lt;/span&gt;&lt;span&gt;ExplicitUpdateExprs&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;		assignment, ok &lt;/span&gt;&lt;span&gt;:=&lt;/span&gt;&lt;span&gt; expr.(&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;gmsexpression&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;SetField&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;		if&lt;/span&gt;&lt;span&gt; !&lt;/span&gt;&lt;span&gt;ok {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;			return&lt;/span&gt;&lt;span&gt; nil&lt;/span&gt;&lt;span&gt;, fmt.&lt;/span&gt;&lt;span&gt;Errorf&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;"UPDATE: expected SetField, found &lt;/span&gt;&lt;span&gt;%T&lt;/span&gt;&lt;span&gt;"&lt;/span&gt;&lt;span&gt;, expr)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;		// SetField performs assignment conversion and returns a copy of oldRow.&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;		// Merge only its target, so later assignments cannot undo earlier writes.&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;		value, err &lt;/span&gt;&lt;span&gt;:=&lt;/span&gt;&lt;span&gt; assignment.&lt;/span&gt;&lt;span&gt;Eval&lt;/span&gt;&lt;span&gt;(ctx, oldRow)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;		if&lt;/span&gt;&lt;span&gt; err &lt;/span&gt;&lt;span&gt;!=&lt;/span&gt;&lt;span&gt; nil&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;			return&lt;/span&gt;&lt;span&gt; nil&lt;/span&gt;&lt;span&gt;, err&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;		}&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;		...&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now Doltgres returns the expected result, the same as Postgres.&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="sql"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;a |  b&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;---+-----&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt; | &lt;/span&gt;&lt;span&gt;100&lt;/span&gt;&lt;span&gt;    -- per the SQL standard, every assignment reads the pre-update row&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check out these &lt;a href="https://github.com/dolthub/go-mysql-server/pull/3840"&gt;two&lt;/a&gt;
&lt;a href="https://github.com/dolthub/doltgresql/pull/3300"&gt;PRs&lt;/a&gt; for the full details.&lt;/p&gt;
&lt;h1 id="conclusion"&gt;Conclusion&lt;a class="anchor-link" aria-label="Link to heading" href="#conclusion"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Doltgres 1.0 already launched, but Doltgres’s compatibility story is definitely not over. Keep the
issues coming and &lt;a href="https://www.dolthub.com/blog/2024-05-15-24-hour-bug-fixes/"&gt;we’ll keep knocking them down in 24
hours&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Have a divergence in Postgres behavior to report? Want to learn more about Doltgres? Visit us on the
&lt;a href="https://discord.gg/gqr7K4VNKe"&gt;DoltHub Discord&lt;/a&gt; where our engineering team hangs out all day. Hope
to see you there.&lt;/p&gt;</content:encoded>
      <dc:creator>Zach Musgrave</dc:creator>
      <category>doltgres</category>
    </item>
    <item>
      <title>Implementing Type Contracts via Mutually Referencing Type Parameters</title>
      <link>https://dolthub.com/blog/2026-08-28-mutually-referencing-type-parameters/</link>
      <guid isPermaLink="true">https://dolthub.com/blog/2026-08-28-mutually-referencing-type-parameters/</guid>
      <description>It's not obvious how to properly write generic code that operates on recursive or mutually-recursive types. Here's how to do it right.</description>
      <pubDate>Fri, 28 Aug 2026 00:00:00 GMT</pubDate>
      <content:encoded>&lt;p&gt;I work for &lt;a href="https://www.dolthub.com/"&gt;Dolt&lt;/a&gt;, the world’s first version-controlled database. We made Dolt as a drop-in replacement for MySQL, since MySQL was the most commonly used SQL database in production when we started. But new teams by-and-large are not choosing MySQL; they’re using Postgres. So we also made &lt;a href="https://www.doltgres.com/"&gt;Doltgres&lt;/a&gt;, a alternate version of Dolt that speaks the Postgres dialect.&lt;/p&gt;
&lt;p&gt;Unsurprisingly, Dolt and Doltgres share a lot of common code. But there’s also subtle differences between MySQL and Postgres’s feature set. We want to use shared code for things that the projects have in common, and interfaces to implement behavior where they differ.&lt;/p&gt;
&lt;p&gt;One of our big features is Git-style branches. A client session operates on a currently checked-out branch, and is completely independent of the other branches in the database. Except when I say “completely independent”, I actually mean “mostly independent.” When we made Dolt, we decided that there was one specific situation where we wanted branches to &lt;em&gt;not&lt;/em&gt; be independent: auto incrementing columns.&lt;/p&gt;
&lt;p&gt;In MySQL, if a table has a column declared with the &lt;code&gt;AUTO_INCREMENT&lt;/code&gt; modifier, inserts aren’t required to specify a value for that column. Instead, a new value will be generated that is guaranteed to not conflict with any values currently in the table. This is true even when multiple sessions are making transactions concurrently, which each transaction getting a different value for the column. While transactions are typically independent from each other, MySQL makes an exception here so that the transactions won’t conflict if both are committed.&lt;/p&gt;
&lt;p&gt;We decided that it made sense to apply that same behavior to branches: if sessions on two different branches are inserting into the same table with an auto increment column, Dolt is guaranteed to generate non-conflicting values for that column. If we didn’t do this, then any attempt to merge those branches would result in a merge conflict.&lt;/p&gt;
&lt;p&gt;In contrast, Postgres doesn’t have &lt;code&gt;AUTO INCREMENT&lt;/code&gt;. Instead, it has &lt;code&gt;SERIAL&lt;/code&gt; columns, which behave similarly but have some key differences:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In MySQL, AUTO INCREMENT values are always unsigned, while in Postgres, SERIAL values are always signed.&lt;/li&gt;
&lt;li&gt;SERIAL columns are backed by a data type called a Sequence, which has configuration parameters such as the min and max values, whether the generated values are incremented or decremented, whether they wrap around when they reach the end, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Synchronizing the behavior across all branches and all transactions has a lot of tricky corner cases, that we’d already gotten right with AUTO INCREMENT, and duplicating that logic would be a bad idea. So we designed a data model that could handle both:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;code&gt;Sequence&lt;/code&gt; is an item in the database capable of producing a sequence of values, such as a MySQL table with an AUTO INCREMENT column, or a Postgres sequence.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;SequenceValue&lt;/code&gt; is a value produced by a sequence.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;SequenceState&lt;/code&gt; is a type that represents the current state of a &lt;code&gt;Sequence&lt;/code&gt; and can be incremented to produce new &lt;code&gt;SequenceValue&lt;/code&gt;s.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using these definitions, we were able to implement all of the behavior common to both MySQL tables and Postgres sequences as generic methods on these types.&lt;/p&gt;
&lt;p&gt;This reminded me of a similar situation I encountered two years ago, involving pairs of data structures each consisting of a mutable type and an immutable type that could be converted between each other. The goal was to write something like the below, that could be used with any pair of types that satisfied this contract:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="go"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;func&lt;/span&gt;&lt;span&gt; ApplyMutations&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;immutable&lt;/span&gt;&lt;span&gt; ImmutableValue&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;mutations&lt;/span&gt;&lt;span&gt; []&lt;/span&gt;&lt;span&gt;Mutation&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;ImmutableValue&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  mutableValue &lt;/span&gt;&lt;span&gt;:=&lt;/span&gt;&lt;span&gt; immutable.&lt;/span&gt;&lt;span&gt;Mutate&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  mutableValue.&lt;/span&gt;&lt;span&gt;ApplyMutations&lt;/span&gt;&lt;span&gt;(mutations)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  return&lt;/span&gt;&lt;span&gt; mutableValue.&lt;/span&gt;&lt;span&gt;Flush&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I wrote a blog post talking about my solution to that problem, how I’d used a Golang generic interface to model a situation where a group of types collectively implement some contract. But there’s a lot in that I got flat-out wrong about how go Golang generics worked, and I got rightfully chewed out for it in the responses to the extent that I’m a bit embarrassed to bring it up again.&lt;sup&gt;&lt;a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;This time, I was determined to make a better solution. This is a real problem, and it’s worth understanding the correct way to tackle it in Go because it’s a useful design pattern for writing type-safe code.&lt;/p&gt;
&lt;h1 id="the-problem"&gt;The Problem&lt;a class="anchor-link" aria-label="Link to heading" href="#the-problem"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;In Go, if you want a function to operate on multiple different types, you can define an interface. An interface is a contract: it specifies a set of constraints that the implementing type must satisfy, usually methods that the type must implement. Any type that implements these methods will satisfy the interface. But this interface only constrains a single type. Sometimes, you have a group of types that need to implement a contract together. How can we use Go’s language features to solve this problem?&lt;/p&gt;
&lt;h2 id="what-doesnt-work-interfaces"&gt;What Doesn’t Work: Interfaces&lt;a class="anchor-link" aria-label="Link to heading" href="#what-doesnt-work-interfaces"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If we were to express the above-mentioned Sequence data model as interfaces, it might look something like this:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="go"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; SequenceValue&lt;/span&gt;&lt;span&gt; interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    int64&lt;/span&gt;&lt;span&gt; |&lt;/span&gt;&lt;span&gt; uint64&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; SequenceState&lt;/span&gt;&lt;span&gt; interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    CurrentValue&lt;/span&gt;&lt;span&gt;() &lt;/span&gt;&lt;span&gt;SequenceValue&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    Advance&lt;/span&gt;&lt;span&gt;() (&lt;/span&gt;&lt;span&gt;nextValue&lt;/span&gt;&lt;span&gt; SequenceValue&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;nextState&lt;/span&gt;&lt;span&gt; SequenceState&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; Sequence&lt;/span&gt;&lt;span&gt; interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    CurrentState&lt;/span&gt;&lt;span&gt;() &lt;/span&gt;&lt;span&gt;SequenceState&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    UpdateFromGlobalState&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SequenceState&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;Sequence&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But making these types regular interfaces is a bad idea for several reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;There’s a performance penalty for calling interface methods due to dynamic dispatch.&lt;/li&gt;
&lt;li&gt;All values of an interface type are boxed and their underlying values are stored on the heap.&lt;/li&gt;
&lt;li&gt;Go doesn’t actually allow interfaces with shape constraints (like &lt;code&gt;SequenceValue&lt;/code&gt; above) to be used in method signatures.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But the biggest problem is that this fails to give us the compile-time type safety we want. It doesn’t document or enforce that a particular &lt;code&gt;SequenceState&lt;/code&gt; implementation is always expected to have a specific type for &lt;code&gt;SequenceValue&lt;/code&gt;. We could need to insert check-casts every time one of these methods is called. If we ever call a method with the wrong implementation, we would panic at runtime.&lt;/p&gt;
&lt;p&gt;This isn’t a good use of interfaces, because we’re paying a cost in performance and code complexity but not getting anything out of it.&lt;/p&gt;
&lt;h2 id="the-bad-idea-a-single-generic-interface"&gt;The Bad Idea: A Single Generic Interface&lt;a class="anchor-link" aria-label="Link to heading" href="#the-bad-idea-a-single-generic-interface"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This was the concept in my previous attempt that rightly got a lot of pushback.&lt;/p&gt;
&lt;p&gt;The basic idea was that if interfaces are how you achieve polymorphism in Go, and an interface is defined by a set of behaviors on a single type, then you can achieve a contract on multiplace types by implementing an interface that accepts each of those types as a generic type parameter.&lt;/p&gt;
&lt;p&gt;So in this case, you would have a “contract” type that defines all the necessary behavior, and generic code must call methods on this contract type:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="go"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; SequenceContract&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;SequenceValue&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;SequenceState&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;Sequence&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    SequenceState_CurrentValue&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SequenceState&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;SequenceValue&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    SequenceState_Advance&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;SequenceState&lt;/span&gt;&lt;span&gt;) (&lt;/span&gt;&lt;span&gt;nextValue&lt;/span&gt;&lt;span&gt; SequenceValue&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;nextState&lt;/span&gt;&lt;span&gt; SequenceState&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    Sequence_CurrentState&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;Sequence&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;SequenceState&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    Sequence_UpdateFromGlobalState&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;Sequence&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;SequenceState&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;Sequence&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The main downside of this is that it’s ugly. Shared code can’t call methods on the component types because they all have an &lt;code&gt;any&lt;/code&gt; type constraint. Instead it &lt;em&gt;must&lt;/em&gt; call the methods on &lt;code&gt;SequenceContract&lt;/code&gt;, which will likely just delegate to the corresponding methods on the component types.&lt;/p&gt;
&lt;p&gt;This approach also requires that shared code takes a &lt;code&gt;SequenceContract&lt;/code&gt; value as an extra parameter. This also requires the shared code to be itself generic, which means that prior to Go 1.27 it couldn’t be a method and had to be a function.&lt;/p&gt;
&lt;p&gt;There are some possible upsides to this approach: implementations of the contract type are allowed to have state, and it’s possible to define multiple contracts on the same collection of types. But these “upsides” are a double-edged sword, because now you’re adding further complexity to your data model. This is rarely the best approach.&lt;/p&gt;
&lt;h1 id="almost-a-solution-generic-interfaces"&gt;Almost A Solution: Generic Interfaces&lt;a class="anchor-link" aria-label="Link to heading" href="#almost-a-solution-generic-interfaces"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;We could attempt to capture the relationship between types via generic interfaces. Going back to original example with the corresponding mutable and immutable types, we could attempt to write interfaces like so:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="go"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; ImmutableValue&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt; ...&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  Mutate&lt;/span&gt;&lt;span&gt;() &lt;/span&gt;&lt;span&gt;T&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; MutableValue&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt; ...&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  ApplyMutations&lt;/span&gt;&lt;span&gt;([]&lt;/span&gt;&lt;span&gt;Mutation&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  Flush&lt;/span&gt;&lt;span&gt;() &lt;/span&gt;&lt;span&gt;T&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But what do we put in place of ”…” in the example above?&lt;/p&gt;
&lt;p&gt;We can’t have the two interfaces reference each other (that is, we can’t write &lt;code&gt;type ImmutableValue[T MutableValue]&lt;/code&gt;) because &lt;code&gt;MutableValue&lt;/code&gt; isn’t a complete type. And even if we could somehow do that, prior to Go 1.26 we weren’t allowed to have both &lt;code&gt;ImmutableValue&lt;/code&gt; and &lt;code&gt;MutableValue&lt;/code&gt; reference each other in their type constraints.&lt;/p&gt;
&lt;p&gt;One option is to just use &lt;code&gt;any&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="go"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; ImmutableValue&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  Mutate&lt;/span&gt;&lt;span&gt;() &lt;/span&gt;&lt;span&gt;T&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; MutableValue&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  ApplyMutations&lt;/span&gt;&lt;span&gt;([]&lt;/span&gt;&lt;span&gt;Mutation&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  Flush&lt;/span&gt;&lt;span&gt;() &lt;/span&gt;&lt;span&gt;T&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But this alone isn’t enough to let us write a function like &lt;code&gt;ApplyMutations&lt;/code&gt; above: if the return type of &lt;code&gt;Mutate()&lt;/code&gt; is constrained by &lt;code&gt;any&lt;/code&gt;, then we can’t call any methods on it.&lt;/p&gt;
&lt;p&gt;As we’ll soon see, Go 1.26 added Recursive Type Parameters, which actually gives us something that we can put here. But as we’ll also see, putting a strict type constraint here isn’t actually necessary, and doesn’t actually change what the correct solution looks like.&lt;/p&gt;
&lt;h1 id="the-correct-idea-mutually-referential-type-parameters"&gt;The Correct Idea: Mutually Referential Type Parameters&lt;a class="anchor-link" aria-label="Link to heading" href="#the-correct-idea-mutually-referential-type-parameters"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;This is a technique originally described in &lt;a href="https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#mutually-referencing-type-parameters"&gt;the original Go type parameters proposal&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The idea is to let go of the idea that every part of your data model needs to be described with interfaces. What actually matters is your functions and structs, which describe the data that they accept. An interface is powerful because it allows you to name a set of constraints and reuse them. It’s a useful tool for deduplicating constraint definitions and for composing them, but they’re a means to an end.&lt;/p&gt;
&lt;p&gt;So building on the previous example, we can use &lt;code&gt;any&lt;/code&gt; type constraints in the interface definitions, and then further constraint them when these interfaces are actually used:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="go"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; ImmutableValue&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  Mutate&lt;/span&gt;&lt;span&gt;() &lt;/span&gt;&lt;span&gt;T&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; MutableValue&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  ApplyMutations&lt;/span&gt;&lt;span&gt;([]&lt;/span&gt;&lt;span&gt;Mutation&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  Flush&lt;/span&gt;&lt;span&gt;() &lt;/span&gt;&lt;span&gt;T&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;func&lt;/span&gt;&lt;span&gt; ApplyMutations&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    ImmutableType&lt;/span&gt;&lt;span&gt; ImmutableValue&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;MutableType&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    MutableType&lt;/span&gt;&lt;span&gt; MutableValue&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;ImmutableType&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;](&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    immutable&lt;/span&gt;&lt;span&gt; ImmutableValue&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    mutations&lt;/span&gt;&lt;span&gt; []&lt;/span&gt;&lt;span&gt;Mutation&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;ImmutableValue&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  mutableValue &lt;/span&gt;&lt;span&gt;:=&lt;/span&gt;&lt;span&gt; immutable.&lt;/span&gt;&lt;span&gt;Mutate&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  mutableValue.&lt;/span&gt;&lt;span&gt;ApplyMutations&lt;/span&gt;&lt;span&gt;(mutations)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;  return&lt;/span&gt;&lt;span&gt; mutableValue.&lt;/span&gt;&lt;span&gt;Flush&lt;/span&gt;&lt;span&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And for the case of the &lt;code&gt;Sequence&lt;/code&gt; type, which must be able to return itself, it can take a self-referential type constraint. These interfaces are then used in creating the full set of type constraints for a struct, which
contains our actual business logic as methods:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="go"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; SequenceState&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;Self&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;ValueType&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    CurrentValue&lt;/span&gt;&lt;span&gt;() &lt;/span&gt;&lt;span&gt;ValueType&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    Advance&lt;/span&gt;&lt;span&gt;() (&lt;/span&gt;&lt;span&gt;nextValue&lt;/span&gt;&lt;span&gt; ValueType&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;nextState&lt;/span&gt;&lt;span&gt; Self&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; Sequence&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;Self&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;StateType&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;ValueType&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    CurrentState&lt;/span&gt;&lt;span&gt;() &lt;/span&gt;&lt;span&gt;StateType&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    UpdateFromGlobalState&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;StateType&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;Self&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; SequenceTracker&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    ValueType&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    StateType&lt;/span&gt;&lt;span&gt; SequenceState&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;StateType&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;ValueType&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    SequenceType&lt;/span&gt;&lt;span&gt; Sequence&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;SequenceType&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;StateType&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;ValueType&lt;/span&gt;&lt;span&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    ...&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that even though the interface definitions don’t enforce any requirements for their type parameters, the code is still fully type-safe because the types are fully constrained where they’re actually used.&lt;/p&gt;
&lt;p&gt;The one downside is that the function and struct definitions themselves can become quite verbose. And every function that accepts these types must duplicate the type constraint. The interface definitions can reduce the verbosity but don’t eliminate it. Fortunately, all these types can be inferred at the callsite, so the callsite remains clean.&lt;/p&gt;
&lt;p&gt;Go 1.26 allows us to further constrain the interface definitions by allowing the type constraints to reference the interface type being defined:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="go"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; SequenceState&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    Self&lt;/span&gt;&lt;span&gt; SequenceState&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;Self&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;ValueType&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    ValueType&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    CurrentValue&lt;/span&gt;&lt;span&gt;() &lt;/span&gt;&lt;span&gt;ValueType&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    Advance&lt;/span&gt;&lt;span&gt;() (&lt;/span&gt;&lt;span&gt;nextValue&lt;/span&gt;&lt;span&gt; ValueType&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;nextState&lt;/span&gt;&lt;span&gt; Self&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; Sequence&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    Self&lt;/span&gt;&lt;span&gt; Sequence&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;Self&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;StateType&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;ValueType&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    StateType&lt;/span&gt;&lt;span&gt; SequenceState&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;Self&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;ValueType&lt;/span&gt;&lt;span&gt;],&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    ValueType&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;interface&lt;/span&gt;&lt;span&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    CurrentState&lt;/span&gt;&lt;span&gt;() &lt;/span&gt;&lt;span&gt;StateType&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;    UpdateFromGlobalState&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;StateType&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;Self&lt;/span&gt;&lt;/span&gt;
&lt;span class="line"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, this does not reduce any type constraints in the functions and structs that use these interfaces. In my experience the main benefit of this is to make the types more self-documenting, not to provide additional type safety.&lt;/p&gt;
&lt;h1 id="the-blind-spot"&gt;The Blind Spot&lt;a class="anchor-link" aria-label="Link to heading" href="#the-blind-spot"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Everything example I’ve shown except for the last one has existed since Go 1.18, when type parameters were first added. So why didn’t I identify the proper solution previously?&lt;/p&gt;
&lt;p&gt;There were two facets that I think blindsided me: the use of &lt;code&gt;any&lt;/code&gt; within type constraints, and the ambiguous documentation around self-referential type constraints.&lt;/p&gt;
&lt;h2 id="any-type-constraints"&gt;&lt;code&gt;any&lt;/code&gt; Type Constraints&lt;a class="anchor-link" aria-label="Link to heading" href="#any-type-constraints"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It’s generally discouraged to use &lt;code&gt;any&lt;/code&gt; as a parameter type, and recommended to use the most specific type possible in interfaces and APIs. Given that advice, I had attempted to avoid using &lt;code&gt;any&lt;/code&gt; as a type constraint outside of situations where it was explicitly expected to support any type. Then, because it wasn’t possible to fully express these constraints within interface definitions prior to 1.26, I concluded that it wasn’t possible to write valid interface definitions for this situation.&lt;/p&gt;
&lt;p&gt;But in fact, it’s perfectly fine to use &lt;code&gt;any&lt;/code&gt; as a type constraint, and it doesn’t mean that the code you write will have to accept &lt;code&gt;any&lt;/code&gt; as a variable type.&lt;/p&gt;
&lt;p&gt;Think of a generic type for a data structure:&lt;/p&gt;
&lt;pre class="astro-code github-dark" tabindex="0" data-language="go"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; MinHeap&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt; any&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;interface&lt;/span&gt;&lt;span&gt; { &lt;/span&gt;&lt;span&gt;...&lt;/span&gt;&lt;span&gt; }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This doesn’t imply that you’re actually going to specialize it with &lt;code&gt;any&lt;/code&gt;. It’s just a constraint. Don’t be afraid of &lt;code&gt;any&lt;/code&gt; in type constraints.&lt;/p&gt;
&lt;h2 id="ambiguity-in-documentation"&gt;Ambiguity in documentation&lt;a class="anchor-link" aria-label="Link to heading" href="#ambiguity-in-documentation"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The original proposal for type parameters describes the above pattern as “mutually referencing type parameters”. And indeed, the only examples provided are cases where two type parameters reference each other. There are no examples of type parameters that reference themselves.&lt;/p&gt;
&lt;p&gt;When I initially attempting to write a type constraint for the &lt;code&gt;ImmutableValue&lt;/code&gt; interface above, I attempted to write the
version with the recursive type constraints, which would not be supported until 1.26. When this was rejected, I incorrectly assumed that it was the self-referential nature of the type constraint that made it not allowed. In fact, it has always been allowed for a type constraint to reference its own type parameter.&lt;/p&gt;
&lt;h1 id="conclusion"&gt;Conclusion&lt;a class="anchor-link" aria-label="Link to heading" href="#conclusion"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Go isn’t like other languages, and its worth learning its idioms and coding patterns. I still have my gripes: I don’t like how verbose this approach is, how it contains duplicate type constraints at every generic function that needs to operate on the defined types. But adopting the recommended coding styles has also helped to expand how I think about generic code in Go.&lt;/p&gt;
&lt;p&gt;As always, if you have thoughts or if you want to tell me how wrong I am, feel free to join our &lt;a href="https://discord.gg/gqr7K4VNKe"&gt;Discord&lt;/a&gt; and shoot me a message.&lt;/p&gt;
&lt;section data-footnotes="" class="footnotes"&gt;&lt;h2 class="sr-only" id="footnote-label"&gt;Footnotes&lt;a class="anchor-link" aria-label="Link to heading" href="#footnote-label"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li id="user-content-fn-1"&gt;
&lt;p&gt;But you can still read it &lt;a href="https://www.dolthub.com/blog/2024-11-22-are-golang-generics-simple-or-incomplete-1/"&gt;here&lt;/a&gt;, if you like. &lt;a href="#user-content-fnref-1" data-footnote-backref="" aria-label="Back to reference 1" class="data-footnote-backref"&gt;↩&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;</content:encoded>
      <dc:creator>Nick Tobey</dc:creator>
      <category>golang</category>
    </item>
  </channel>
</rss>
