Postgres rewritten in Rust, now passing 100% of the Postgres regression tests A Rust rewrite of PostgreSQL called pgrust now passes 100% of PostgreSQL 18.3's regression tests, matching expected output across more than 46,000 queries. The project aims to make PostgreSQL easier to modify internally while maintaining disk compatibility and using AI-assisted programming. It is not yet production-ready or performance-optimized. A Postgres rewrite in Rust. pgrust targets compatibility with Postgres 18.3 and matches Postgres's expected output across more than 46,000 regression queries. pgrust is disk compatible with Postgres and can boot from an existing Postgres 18.3 data directory. The goal is to make Postgres easier to change from the inside: keep the behavior Postgres-shaped, keep the real Postgres tests as the oracle, and use Rust plus AI-assisted programming to explore deeper server changes. pgrust is not production-ready yet. It is not performance optimized yet. Existing Postgres extensions and procedural language extensions such as PL/Python, PL/Perl, and PL/Tcl are not generally compatible yet. Some bundled contrib modules are already ported, and more compatibility may be possible over time. - multithreaded Postgres internals - built-in connection pooling - better JSON-heavy workload support - fast forking and branching workflows - storage experiments, including no-vacuum designs - runtime guardrails for bad queries and AI-generated SQL - fewer sudden bad plan switches Try the WebAssembly demo at https://pgrust.com https://pgrust.com . Docker: docker run -d --name pgrust -e POSTGRES PASSWORD=secret malisper/pgrust:v0.1 && until docker exec -e PGPASSWORD=secret pgrust psql -h 127.0.0.1 -U postgres -c '\q' /dev/null 2 &1; do sleep 1; done && docker exec -it -e PGPASSWORD=secret pgrust psql -h 127.0.0.1 -U postgres; docker rm -f pgrust This uses the psql client inside the Docker image. malisper/pgrust:latest currently points at the same release, but v0.1 is the pinned launch image. macOS: brew install icu4c openssl@3 libpq export LIBRARY PATH="$ brew --prefix openssl@3 /lib:${LIBRARY PATH:-}" export PKG CONFIG PATH="$ brew --prefix openssl@3 /lib/pkgconfig:$ brew --prefix icu4c /lib/pkgconfig:${PKG CONFIG PATH:-}" export PATH="$ brew --prefix libpq /bin:$PATH" Debian/Ubuntu: sudo apt-get update sudo apt-get install -y build-essential pkg-config libicu-dev libssl-dev libldap2-dev libpam0g-dev postgresql-client-18 Build: PGRUST PGSHAREDIR="$PWD/vendor/postgres-18.3/share" \ cargo build --release --locked --bin postgres Create a data directory: target/release/postgres --initdb \ -D /tmp/pgrust-data \ -L "$PWD/vendor/postgres-18.3/share" \ --no-locale \ --encoding UTF8 \ -U postgres Run pgrust: ulimit -s 65520 RUST MIN STACK=33554432 target/release/postgres \ -D /tmp/pgrust-data \ -F \ -c listen addresses= \ -k /tmp \ -p 5432 \ -c io method=sync \ -c max stack depth=60000 Connect: psql -h /tmp -p 5432 -U postgres -d postgres \ -c "select version , 1 + 1 as two" Run the Postgres regression tests against pgrust: PGRUST BIN="$PWD/target/release/postgres" \ scripts/run-regression The runner uses pgrust's own --initdb plus the vendored Postgres 18.3 test files in this repository. It needs a Postgres 18 psql client on PATH ; if psql is somewhere else, set PGRUST PSQL=/path/to/psql . Verified launch result: pgrust matched Postgres's expected output across more than 46,000 regression queries. This repository now contains the newer pgrust implementation that reached the regression-test milestone. The older public implementation is archived on archive/pre-fabled-2026-06-23 . Background: - Original pgrust launch: https://malisper.me/pgrust-rebuilding-postgres-in-rust-with-ai/ https://malisper.me/pgrust-rebuilding-postgres-in-rust-with-ai/ - 67% regression update: https://malisper.me/pgrust-update-at-67-postgres-compatibility-and-accelerating/ https://malisper.me/pgrust-update-at-67-postgres-compatibility-and-accelerating/ - Four Horsemen roadmap: https://malisper.me/the-four-horsemen-behind-thousands-of-postgres-outages/ https://malisper.me/the-four-horsemen-behind-thousands-of-postgres-outages/ Please open an issue if something breaks, if setup is confusing, or if there is a Postgres improvement you want to see first. - Email: maintainers@pgrust.com mailto:maintainers@pgrust.com - Discord: https://discord.gg/FZZ4dbdvwU https://discord.gg/FZZ4dbdvwU - Mailing list: https://malisper.me/subscribe/ https://malisper.me/subscribe/ pgrust is licensed under AGPL-3.0. See LICENSE .