pgrust Achieves 100% Postgres 18.3 Regression Test Parity
pgrust, an open-source rewrite of PostgreSQL in Rust, has successfully passed the complete Postgres regression suite of over 46,000 queries. The system achieves direct disk compatibility with Postgres 18.3, allowing it to boot from existing data directories while preparing a foundation for major internal architectural experiments.
Compatibility and Core Architecture
The pgrust project has achieved full compatibility with the Postgres 18.3 regression suite, matching expected output across 46,000 regression queries. The codebase is written almost entirely in Rust, representing 99.8% of the repository. Rather than implementing a clean-slate SQL database, the developers of pgrust designed the engine to remain strictly Postgres-shaped, using the official reference tests as an oracle to verify correctness.
This architectural fidelity extends to the storage layer. The engine is disk-compatible with PostgreSQL 18.3, meaning it can initialize and boot directly from an existing Postgres data directory without requiring data dumps or schema migrations.
Current Limitations and Execution Parameters
Despite passing the regression suite, the developers state that pgrust is not production-ready or performance-optimized. Traditional procedural language extensions, including PL/Python, PL/Perl, and PL/Tcl, are not compatible with the current version. However, some bundled contrib modules have already been ported.
Running the binary demands non-standard system-level stack allocations to accommodate the execution path of the compiled Rust engine. Executing pgrust requires raising the shell stack limit to 65,520 via ulimit, setting the RUST_MIN_STACK environment variable to 33,554,432 bytes, and passing a max_stack_depth configuration parameter of 60,000 to the server binary.
Architectural Roadmap
- Multithreaded internal architecture to replace the traditional process-per-connection model.
- Native, built-in connection pooling.
- Specialized support for JSON-heavy workloads.
- Fast database branching and forking workflows.
- Storage engine experimentation, specifically focusing on no-vacuum designs.
- Runtime guardrails to manage bad queries and AI-generated SQL.
- Preventive mechanisms to reduce sudden, detrimental execution plan switches.
Implementation Background
The current repository contains a newer pgrust implementation that achieved the regression milestone. The older, initial public version of the project has been archived under the tag archive/pre-fabled-2026-06-23.
Building the engine from source requires system-level dependencies including OpenSSL 3, ICU (icu4c), and libpq. The test runner uses pgrust's own initialization tool alongside vendored Postgres 18.3 share files to execute correctness checks. The project is licensed under the AGPL-3.0 license.