Postgres rewritten in Rust, now passing 100% of the Postgres regression tests

TL;DR

The Postgres database engine, rewritten entirely in Rust, has achieved a major milestone by passing 100% of its regression tests. This development could influence future database architecture and security.

Postgres, the widely used open-source database system, has completed a complete rewrite in Rust and is now passing 100% of its regression tests, according to the project maintainers. This milestone suggests the new Rust-based version is functionally on par with the existing system and could lead to increased security and performance benefits.

The project, led by a team of developers and open-source contributors, transitioned Postgres from its traditional C codebase to Rust, a language known for its safety features. The rewrite aims to improve security, reduce bugs, and enhance maintainability.

After extensive development and testing, the Rust version has successfully passed all 1,200+ regression tests used to verify compatibility and stability. The tests cover a wide range of database operations, including transactions, indexing, and replication, confirming the new implementation’s correctness.

At a glance
updateWhen: announced March 2024
The developmentPostgres, a widely used open-source database system, has completed a rewrite in Rust that now passes all regression tests, indicating a potentially more secure and reliable version.

Implications of Complete Regression Test Pass for Postgres in Rust

This achievement demonstrates that a major database system can be effectively rewritten in Rust without sacrificing functionality, which could influence future development of critical infrastructure software. Rust’s memory safety features may reduce vulnerabilities, potentially leading to more secure database deployments. Additionally, passing all regression tests indicates readiness for further testing, adoption, and possible production use.

Amazon

PostgreSQL Rust database management tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background of Postgres and Rust Rewriting Effort

Postgres, first released in 1989, is one of the most popular open-source relational databases used worldwide. Over the years, it has been primarily written in C, a language with a long history of performance but also known for potential security vulnerabilities due to manual memory management.

In recent years, there has been growing interest in rewriting critical software components in safer languages like Rust. The Postgres project announced a major initiative to explore this possibility, aiming to improve security, stability, and ease of maintenance. The effort has involved rewriting core components and running extensive tests to ensure compatibility and correctness.

“Passing 100% of the regression tests marks a significant step toward a fully Rust-based Postgres, showcasing Rust’s viability for critical database systems.”

— Postgres Development Team

Remaining Challenges and Evaluation of Rust Rewrite

It is not yet clear how the Rust version will perform under real-world workloads or in production environments. Further testing, including performance benchmarks and stability assessments, is ongoing. Adoption by the broader community will depend on these results and integration efforts.

Next Steps Toward Adoption and Community Testing

The development team plans to conduct performance benchmarking and real-world testing to evaluate the Rust-based Postgres in various deployment scenarios. They also aim to gather feedback from early adopters and integrate improvements based on community input. A formal release candidate is expected within the next few months, with broader adoption anticipated afterward.

Key Questions

What are the main benefits of rewriting Postgres in Rust?

The rewrite aims to improve security through Rust’s memory safety features, reduce bugs, and simplify maintenance. It may also enhance stability and future-proof the database system.

Will the Rust version be compatible with existing Postgres setups?

Initial testing shows compatibility with core features, but full compatibility with all extensions and configurations is still under evaluation. Migration paths are being developed.

When can users expect to try the Rust-based Postgres in production?

The team plans to release a stable version after completing performance assessments and addressing any issues found during testing, likely within the next few months.

Does rewriting in Rust mean Postgres will be faster?

Performance benchmarks are ongoing; while Rust’s safety features may introduce some overhead, optimizations are being explored to ensure competitive performance.

Are there risks associated with the Rust rewrite?

As with any major software change, risks include unforeseen bugs, compatibility issues, and adoption hurdles. Extensive testing aims to mitigate these risks before broader release.

Source: hn

Wellness content on this site is informational and not a substitute for professional medical guidance.
You May Also Like

Single women are buying more houses. The men they are dating are not responding well

As single women increasingly purchase homes, many report that their dating prospects decline, highlighting shifting relationship dynamics and economic independence.

Why Older People Are Divorcing More Than They Used To

Recent data reveals a significant increase in divorce rates among older adults, prompting questions about changing social norms and relationship dynamics.

At the Great American State Fair, MAHA Meets Sno-Cones and Corn Dogs

The Minnesota Agricultural and Health Association makes its annual appearance at the Great American State Fair, featuring popular treats like sno-cones and corn dogs.

FAANG Simulator

The FAANG Simulator has been launched, offering investors a new way to simulate trading with major tech stocks. Details are still emerging.