Doltgres Beta Launch
Dolt is the world's first and only version-controlled SQL database. It's a database that you can branch and merge, fork and clone, push and pull like a git repository. Dolt uses the MySQL dialect and wire protocol, but there's no MySQL code in it -- it's a custom storage and query engine built from the ground up to make Git-style version control possible and efficient. But from the beginning, one of our most common feature requests was to implement a Postgres compatible version instead, since software engineers now prefer that dialect and ecosystem to MySQL by a large and growing margin.
18 months ago, we announced the alpha release of Doltgres, the Postgres version of Dolt. Last summer we talked about what it would mean for Doltgres to go Beta. Today, we're excited to announce that we have passed our internal milestones and Doltgres Beta is now available to download and run.
Doltgres is free and open source. Try it now and let us know what you think!
What does Beta mean?
Beta quality for Doltgres means that you can begin building a production solution using
Doltgres. Some Postgres features aren't implemented yet, there will be bugs, and performance is
worse than it will be in a year. But our expectation is that for most users, your existing Postgres
applications and tools should just work. If you use pg_dump
to dump your current Postgres
database, Doltgres should be able to import it. If you have a library or framework that you use to
connect to Postgres, it should be able to connect to Doltgres too. If you find this isn't the case,
please file an issue and let us know.
Beta quality also means that we have a handle on the complexity of the product, and believe we can fix most issues in 24 hours or less. Things like bugs in query results, missing functions or types, or unsupported syntax should have a one-day turnaround. More complicated missing features (e.g. publications) that will take us longer than a day to implement will get a firm ETA that day instead.
Doltgres Beta has over 90% correctness on the sqllogictest benchmark, which will rapidly improve to over 99% as we fix remaining syntax incompatibilities. It is currently 5.2x slower than Postgres, which in practice means 0.1 ms for a point select instead of 0.02 ms. This gap will also close as we shift our focus from features to performance.
The details: what works and what doesn't
Postgres has a lot of features that MySQL does not, or that work very differently from MySQL, and we've been busy building them over the last 18 months. We've prioritized building the ones that we think are most commonly used. Here's a partial list of what we are confident works.
- Schemas
- Sequences and sequence functions
- Almost all built-in types
- Array types and functions
- Common built-in functions
- Most
ALTER TABLE
statements COPY
command for loading data and dumpspg_catalog
system schema tables- User-defined functions
- Users, roles, and permissions
ON CONFLICT
inINSERT
statementsINSERT INTO .. RETURNING
syntax- Stored procedures
- User-defined domain types
- Automatic indexing and inlining of out-of-band storage types (TOAST)
There are also features we know don't work yet. These include:
- Triggers (launching later this month)
- Collations (currently ignored, everything is stored as Go's default collation)
- Many less common built-in functions. We can implement missing ones in 24 hours if you file an issue.
- Some DDL statements such as
ALTER SEQUENCE
orCOMMENT ON
. - Common table expressions (
WITH
) - Updates on two or more tables in the same statement
- Custom operators
- Custom indexing (anything not built in)
- Custom aggregate functions
- Window functions
- Some
psql
commands, notably\d <table>
- Extensions. We will be implementing support for common extensions like PostGIS as customers ask.
- Specific bugs in supported functionality. If you hit one, please tell us so that we can prioritize it.
This second list is the set of things we know about and have already scheduled on our roadmap. If what you need isn't here, please file an issue.
Doltgres's architecture
Doltgres is built on top of Dolt, which provides the storage engine, system tables, and procedures which implement version control. Both Dolt and Doltgres use the go-mysql-server project as the SQL query engine. Doltgres works by translating queries provided in the Postgres dialect to an AST that can be processed by the existing SQL engine. The diagram below shows how queries flow through the system for Dolt (on top) and Doltgres (on the bottom).
Because Dolt and Doltgres share a storage layer, version control functions, and query execution engine, we are confident that the things that work in Dolt also work in Doltgres (properly translated to the appropriate dialect, of course). Doltgres builds on Dolt's six years of development as the world's first version-controlled SQL database, and most future improvements and additions to Dolt should come across to Doltgres at the same time. Doltgres is the Postgres-flavored version of Dolt, and the two products will continue to evolve and grow together.
On top of this base of functionality, Doltgres adds features that Postgres has but MySQL does not, things like schemas, sequences, and custom types. It also replaces server-specific details, such as authorization and system settings.
Looking forward to 1.0
Doltgres Beta is ready for prime time now, and there's no need to wait for 1.0 to begin building with it. But we take the promise of a 1.0 release seriously, and want to discuss what it will mean to get there and what it will take.
Dolt hit 1.0 a little less than two years ago after several years of development and beta releases. We expect that Doltgres will follow a similar path, and anticipate hitting a 1.0 release approximately a year from now.
Here's what we said 1.0 meant for Dolt:
- Forward Storage Compatibility
- Production Performance
- MySQL Compatibility
- Stable Version Control Interface
We'll hold ourselves to the same standard for Doltgres. Luckily for us, the performance and version control stability (items 2 and 4) are mostly solved for Doltgres because it's built on Dolt (although some aspects of Doltgres's performance will need to be addressed separately). That leaves two items:
- Forward Storage Compatibility: Doltgres uses new serialization techniques for the features and types found in Postgres but not in MySQL. We won't declare 1.0 until we are confident these formats are stable, meaning no data migrations for other 1.x releases.
- Postgres Compatibility: Postgres has a much, much larger surface area of features than MySQL does, and we have not implemented all of it. We won't declare 1.0 until we are confident we have covered 99% of what typical customers require.
For people shopping for a version-controlled database and not choosy about the dialect or SQL feature set, our recommendation continues to be to choose Dolt. It's already feature complete and production quality, backing many hundreds of customer applications.
But if you feel strongly about the Postgres dialect and ecosystem, then please do try Doltgres instead. It's ready to build on today, and should be stable enough and performant enough to write a version-controlled application against. You may encounter bugs and missing features, but we'll fix them for you in 24 hours or less.
What you can do to help
If this project excites you, there are a few things you can do to speed it along.
First and most importantly, download and run Doltgres. Dump your existing Postgres database and import it into Doltgres. If anything doesn't work, file an issue to let us know.
Visit the Doltgres repo on Github and give it a star. Every star counts.
Write about Doltgres on your blog or social media, and tell your friends and colleagues that the wait for a Postgres-flavored Dolt is finally over.
And lastly, come by our Discord server, where our engineering team hangs out all day long. Nothing makes us happier than talking to our customers about the product.
Conclusion
If you've been interested in a version-controlled SQL database but have been waiting for the Postgres version, this is your signal to try it out now. This release has been years in the making and represents a lot of hard work and innovation by the team. We're very excited for you to try it and to tell us what you think.
Questions about using the beta release? Find a bug you want fixed? Come by our Discord to talk to our engineering team and meet other Doltgres users.