HeadlinesBriefing favicon HeadlinesBriefing.com

Postgres Rewritten in Rust Achieves Full Test Compatibility

Hacker News •
×

A project named pgrust has rewritten the Postgres database engine in Rust, achieving 100% compatibility with over 46,000 Postgres regression tests. Targeting compatibility with Postgres 18.3, pgrust is disk-compatible and can boot from an existing Postgres 18.3 data directory. This rewrite aims to make Postgres more adaptable internally, using Rust and AI-assisted programming to explore deeper server modifications while retaining core Postgres behavior and testing methodologies.

While not yet production-ready or performance-optimized, pgrust has ported several bundled contrib modules. Future development plans include multithreaded internals, built-in connection pooling, improved JSON workload support, faster forking, and storage experiments like no-vacuum designs. The project also envisions runtime guardrails for AI-generated SQL and better management of query plan switches.

A WebAssembly demo is available at pgrust.com, and a Docker image (malisper/pgrust:v0.1) allows for immediate testing. Building from source requires specific dependencies like ICU and OpenSSL, with detailed instructions provided for macOS and Debian/Ubuntu systems. The project is licensed under AGPL-3.0.