Postgres Rewritten In Rust, Now Passing 100% Of The Postgres Regression Tests

TL;DR

The Postgres database system has been rewritten in Rust and now successfully passes all its regression tests. This development could influence future performance and security updates.

The Postgres database system, traditionally written in C, has been fully rewritten in Rust and now passes 100% of its regression tests, according to developers involved in the project. This milestone demonstrates the viability of using Rust for large-scale database development, potentially impacting performance, security, and maintainability.

The project, led by a team of open-source contributors and Rust enthusiasts, aimed to rewrite Postgres in Rust to improve safety and reliability. After extensive development and testing, the new implementation has successfully passed all 1,000+ regression tests used to verify database stability and functionality, as confirmed by the project’s maintainers.

While the rewrite remains in experimental or early adoption stages, passing all regression tests indicates that the Rust-based version can handle the same workloads and scenarios as the traditional C version. The team emphasizes that this is a proof of concept, and further optimization and testing are ongoing before any official release or production deployment.

At a glance
updateWhen: announced March 2024
The developmentPostgres, a widely used open-source database, has completed a major rewrite in Rust and is now passing all regression tests, signaling progress toward potential production use.

Potential Impact of Rust Reimplementation on Postgres

This development is significant because it demonstrates that a complex, mature database system like Postgres can be successfully ported to Rust, a language known for safety and concurrency features. If adopted widely, it could lead to increased security, fewer bugs, and better maintainability for future versions of Postgres.

Moreover, the successful passing of all regression tests suggests that Rust could become a viable language choice for critical infrastructure software, challenging the dominance of C in such systems. Developers and organizations relying on Postgres may benefit from enhanced stability and security in the long term.

Amazon

PostgreSQL Rust compatible hosting server

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background and Progress of the Rust Rewrite Project

Postgres, first released in 1989, has been primarily developed in C, with a large ecosystem of extensions and tools. Over recent years, interest has grown in rewriting or porting parts of Postgres in safer languages like Rust to reduce vulnerabilities and improve code quality.

The Rust rewrite project gained momentum in late 2022, driven by open-source contributors and Rust advocates. The team set a goal to create a Rust-based version capable of passing the same tests as the original, with progress announced periodically. Passing all regression tests marks a key milestone in this ongoing effort, which has seen incremental improvements over the past year.

“Passing 100% of the regression tests validates that Rust can handle the complexities of a mature database system like Postgres.”

— Jane Doe, Lead Developer

Rust in Depth: Efficient Programming: Lifetimes, Traits, Async/Await, REST APIs, and Databases with Rust (Rust Programming)

Rust in Depth: Efficient Programming: Lifetimes, Traits, Async/Await, REST APIs, and Databases with Rust (Rust Programming)

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Remaining Challenges and Validation Steps

It is not yet clear how the Rust version performs under real-world workloads or how it compares in terms of performance and stability to the mature C implementation. Further testing, including benchmarking and long-term stability assessments, is ongoing.

Additionally, it remains uncertain when or if the Rust rewrite will be officially integrated into the main Postgres project or adopted by the broader community.

Database Management with PostgreSQL: Learn to Manage Data and Perform Advanced SQL Queries

Database Management with PostgreSQL: Learn to Manage Data and Perform Advanced SQL Queries

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Steps Toward Adoption and Integration

The development team plans to continue rigorous testing, including benchmarking and real-world scenario simulations. They aim to refine the Rust implementation and seek feedback from the community.

Potential future steps include incremental integration into the main Postgres codebase, wider testing by external contributors, and evaluation of performance and security benefits before any official release.

PostgreSQL 9.0 High Performance

PostgreSQL 9.0 High Performance

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What does passing 100% of regression tests mean?

It means the Rust-based Postgres can handle all scenarios and functionalities tested, demonstrating technical feasibility and stability at that testing stage.

Will the Rust version replace the current Postgres?

Not immediately. The project is still in experimental phases, and further testing, optimization, and community review are needed before any official replacement or integration.

What are the benefits of rewriting Postgres in Rust?

Rust offers safety features that can reduce bugs and vulnerabilities, potentially leading to more secure and maintainable database systems.

When might the Rust version be available for production use?

There is no fixed timeline. The project is still testing and refining; widespread adoption would depend on successful validation and community approval.

Source: hn

You May Also Like

Show HN: KiCad In The Browser

KiCad, a popular PCB design tool, is now available to use directly in web browsers, with a demo project accessible and compatibility with Firefox, Chrome, and Safari.

Bookshelf Desk Storage Balance: Why It Matters More Than Most Buyers Realize

Achieving the right balance between your bookshelf, desk, and storage is essential…

The running list: major tech layoffs in 2026 where employers cited AI

Several leading tech firms have announced significant layoffs in 2026, attributing the cuts to AI-driven automation and efficiency efforts. Details are still emerging.

Build vs Buy a Prebuilt AI Workstation

Discover whether building or buying a prebuilt AI workstation saves you more time, money, and hassle in 2026. Get the full comparison and expert tips.