Explore an experimental Rust based rewrite of Postgres for research.
Run the WebAssembly demo to try pgrust directly in a browser.
Boot pgrust from an existing Postgres 18.3 data directory.
Run the built in regression test suite against a pgrust build.
| malisper/pgrust | touchhle/touchhle | kamiyaa/joshuto | |
|---|---|---|---|
| Stars | 3,699 | 3,699 | 3,698 |
| Language | Rust | Rust | Rust |
| Setup difficulty | hard | easy | easy |
| Complexity | 5/5 | 4/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Building from source needs several system libraries and Rust's cargo toolchain.
pgrust is an ambitious attempt to rewrite Postgres, one of the most widely used databases in the world, in the Rust programming language. Rather than being a brand new database with its own behavior, the goal is for pgrust to act exactly like real Postgres. It targets compatibility with Postgres version 18.3 and its output already matches real Postgres across more than 46,000 of Postgres's own regression test queries. It is also disk compatible, meaning it can start up using a data directory created by an actual Postgres installation. The motivation behind the project is that Postgres is written in C, an older language that makes certain kinds of changes slow and risky. By rewriting it in Rust and using AI assisted programming to help explore deeper changes to the server, the authors want to make it easier to experiment with things like true multithreading instead of Postgres's one process per connection model, built in connection pooling, and storage designs that avoid the need for vacuuming. The README also mentions an unreleased newer version that reportedly passes all of the regression suite, uses a thread per connection model, and is significantly faster than standard Postgres on both everyday transactions and heavy analytical queries. The project is explicit that it is not production ready and not yet performance tuned, and that many existing Postgres extensions, including procedural language extensions, are not compatible yet. You can try it through a browser based WebAssembly demo, through a prebuilt Docker image, or by building it from source on macOS or Debian based Linux using Rust's build tool, cargo, along with several system libraries. Once built, it includes its own regression test runner that checks its behavior against the same test suite real Postgres uses. pgrust is written in Rust, has 3,699 stars on GitHub, and is licensed under AGPL-3.0. The project maintains a Discord community and a mailing list for people who want to follow its progress toward becoming a usable Postgres replacement.
An in-progress rewrite of the Postgres database in Rust that already matches real Postgres output on over 46,000 regression tests, aiming for deeper changes than the original C codebase allows.
Mainly Rust. The stack also includes Rust, Postgres, Docker.
AGPL-3.0 licensed, meaning any modified version used over a network must also have its source code shared.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.