Why Doltgres over Dolt?
In case you missed it, we shipped a Beta version of Doltgres yesterday. We worked on Doltgres for a year and a half and it finally hit our bar for Beta release. Doltgres is the Postgres-compatible version of Dolt, the world's first version controlled database. Dolt itself is MySQL-compatible.
Dolt is much older and stabler. Dolt 1.0 was shipped in May 2023. Dolt is trusted in production by hundreds of happy customers.
Both Dolt and Doltgres share the same storage and SQL engine. The query parser and server are tailored to MySQL and Postgres SQL dialects respectively. With Doltgres, you get Postgres SQL but the rest of the product is the same as Dolt.
Given the above, what are some good reasons to choose Doltgres over Dolt? What are some bad reasons? This article will answer these questions and more.
Good Reasons to Choose Doltgres
Let's start with the good reasons to run Doltgres instead of Dolt. These are the reasons we built Doltgres in the first place.
Our Company Only Uses Postgres
This is the number one reason we built Doltgres. Most new companies and products choose Postgres as their SQL database. Postgres is the most widely adopted, truly open source SQL database. Postgres has far better community support and bug fixing cadence than the alternatives. Postgres is faster than MySQL. No one ever got fired for choosing Oracle Postgres.
Thus, we had many potential users tell us "We wish Dolt was Postgres" or "We only use Postgres". Often, this was accompanied by something like, "I want to adopt Dolt but the powers that be will only let me run Postgres". Database technology decisions at many companies are not individual decisions. Senior engineers at the company choose a technology and ask every engineer to follow the standard. Even though Doltgres is not Postgres, its existence opens the door to conversations about adoption that would otherwise be closed.
The Database I'm migrating from is Postgres
If you already have a Postgres database and want the version control features of Dolt, incurring a costly SQL dialect migration is often difficult. We know. We support an open source pgdump
to mysqldump
converter. Moreover, you may not control the application code that connects to Postgres, making changes to the SQL dialect impossible.
A Postgres-compatible version of Dolt allows for a migration path for existing Postgres databases. You can use pgdump
to export your Postgres schema and data and import it into Doltgres using psql
. Or, you can even set up Doltgres as a replica of your existing Postgres instance. Every transaction commit becomes a Dolt commit. Your clients can then connect to Doltgres as if it were your already existing Postgres database.
We use Schemas Heavily
Postgres supports an additional namespace layer called a schema. MySQL does not. If you make heavy use of schemas in your Postgres database to organize your tables, migrating to MySQL SQL by flattening your schema hierarchy may be difficult. Doltgres supports schemas.
We Would Rather Invest in the Postgres Ecosystem
Postgres is a growing ecosystem. The MySQL ecosystem seems to be contracting. Doltgres is obviously part of the Postgres ecosystem and Dolt is not. There are really long odds on Dolt reviving the MySQL ecosystem. So Doltgres could be more popular in the long run. Plus, the vibes in the Postgres ecosystem just seem better.
Bad Reasons to Choose Doltgres
Now on to the bad reasons. If you were thinking of using Doltgres for one of these reasons, consider using Dolt instead.
We Need Postgres Extensions
Doltgres does not currently support extensions. We may launch limited extension support in the future for extensions that for example implement only custom functions. However, the current plan is to implement the most popular Postgres extensions, like PostGIS, in Doltgres if there is sufficient demand.
Postgres is Faster
As of Beta launch, Dolt is faster than Doltgres whereas Postgres is faster than MySQL. This may change in the future. Dolt has many years of targeted optimizations and Doltgres cannot use all of them yet.
I Use This Esoteric Postgres Feature
Postgres has more features than MySQL. We've been busy implementing as many as we can for Beta launch. For instance, Doltgres supports many more types like geometric and network types. If you use Postgres because you need some weird Postgres feature, it's likely Doltgres does not support it yet. In the long run, the goal is as close to 100% compatibility as we can get.
Our Recommendation
For the next few years at least, Dolt is going to be more stable than Doltgres. If you can handle the MySQL dialect or a migration to it, you should use Dolt. Doltgres is for users that must have Postgres SQL for whatever reason. Their use case, company, ego, or application requires it. Questions? Come by our Discord and hit us up in the Doltgres channel.