Rust reimplementation of Postgres clears all 46,000 regression tests — but isn't usable yet
Original source
Postgres rewritten in Rust, now passing 100% of the Postgres regression tests
Hacker News →pgrust is a from-scratch reimplementation of PostgreSQL in Rust that now reproduces Postgres 18.3’s expected output across more than 46,000 regression queries — the project’s headline claim of full behavioral parity on the standard test suite. It is disk-compatible with upstream Postgres and can boot directly from an existing 18.3 data directory, and the maintainer ships a Docker image, a WebAssembly demo, and native build instructions for macOS and Linux. The stated motivation is architectural: rebuild Postgres in a memory-safe language with AI-assisted development so its internals become easier to change, while keeping the real Postgres test suite as the correctness oracle.
The caveats matter as much as the milestone. pgrust is explicitly not production-ready and has had no performance tuning, so passing the regression tests demonstrates functional equivalence, not competitiveness with the real server. Extension support is thin — procedural languages like PL/Python, PL/Perl, and PL/Tcl generally don’t work, and only some bundled contrib modules have been ported. In practice that rules out most real-world Postgres deployments, which lean heavily on the extension ecosystem.
The more interesting story is what the Rust foundation is meant to unlock: a roadmap of changes that are painful in the C codebase, including multithreaded internals, built-in connection pooling, fast fork-and-branch workflows, no-vacuum storage designs, and runtime guardrails aimed at bad plans and AI-generated SQL. Whether an AI-assisted rewrite can carry those ambitions into a stable, performant system is unproven, but the regression-test result is a credible checkpoint. The project is AGPL-3.0 licensed.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.