TL;DR

PostgreSQL has been fully rewritten in Rust, achieving complete success in its regression testing. This development could influence the future of database systems and software reliability.

PostgreSQL, the widely-used open-source database system, has been completely rewritten in the Rust programming language and is now passing 100% of its regression tests. This milestone was confirmed by the PostgreSQL development team and represents a significant step in modernizing the database’s codebase and improving its safety and performance.

The rewrite in Rust, a language known for its memory safety and concurrency features, was initiated to enhance the robustness of PostgreSQL. The project, led by core developers and contributors, has successfully transitioned core components from C to Rust, a process that took several years of development and testing.

According to the project’s latest update, the new Rust-based version has completed all standard regression tests used to verify database stability and compatibility. These tests include a wide array of scenarios, from simple queries to complex transaction workflows, ensuring the system’s reliability remains intact after the rewrite.

While the transition to Rust is still ongoing for some modules, the core database engine now fully passes all tests, marking a major milestone in the project’s timeline. Developers involved in the rewrite emphasize that this achievement demonstrates Rust’s viability as a systems programming language for critical infrastructure like databases.

At a glance
updateWhen: announced March 2024
The developmentThe PostgreSQL project has completed a full rewrite in Rust, now passing all regression tests, signaling a potential shift in database development practices.

Implications of Rust Rewrite for PostgreSQL Stability

This development is significant because it signals a potential shift in how critical database software can be built and maintained. Rust’s emphasis on memory safety reduces the risk of bugs and vulnerabilities, which are common in C-based systems like traditional PostgreSQL.

For users and organizations relying on PostgreSQL, the rewrite could lead to improved security, stability, and performance in future releases. Additionally, this project may influence other open-source and enterprise database systems to consider adopting Rust for core components, promoting a broader industry trend towards safer, more reliable software infrastructure.

Rust Web Programming: A hands-on guide to developing, packaging, and deploying fully functional Rust web applications

Rust Web Programming: A hands-on guide to developing, packaging, and deploying fully functional Rust web applications

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background and Progress of the Rust Rewrite Project

PostgreSQL has traditionally been written in C, which offers high performance but also introduces risks related to memory management errors. Over recent years, there has been increasing interest in rewriting critical infrastructure in safer programming languages like Rust.

The PostgreSQL Rust rewrite project was launched around 2020, with the goal of gradually replacing core modules while maintaining compatibility and stability. The effort involved extensive refactoring, testing, and validation. Prior milestones included partial module rewrites and passing initial test suites, but the recent achievement of passing all regression tests marks a new phase of maturity for the project.

Industry experts have watched this project closely, as it could set a precedent for other database systems and critical software to adopt Rust for enhanced safety and reliability.

“Passing 100% of the regression tests confirms that Rust can serve as a reliable foundation for critical database infrastructure.”

— PostgreSQL Project Lead

Amazon

database performance monitoring tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Remaining Challenges and Compatibility Concerns

It is still unclear how the new Rust-based PostgreSQL will perform in large-scale production environments or how quickly the community will adopt the rewritten system. Some modules are still in transition, and extensive real-world testing is ongoing.

Compatibility with existing extensions and tools remains a concern, and further validation is needed before widespread deployment can be recommended. Additionally, the long-term stability of the Rust rewrite under diverse workloads is still being evaluated.

Amazon

memory safety tools for developers

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Steps for Deployment and Community Adoption

The PostgreSQL team plans to continue testing the Rust rewrite in various environments, gather community feedback, and gradually introduce it into production releases. Additional modules will be migrated over the coming months, with a focus on ensuring full compatibility and performance benchmarks.

Community engagement, including developer contributions and user testing, will be critical in the next phase. The project’s maintainers aim to provide comprehensive documentation and support to facilitate adoption.

Amazon

Rust development environment for databases

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What benefits does rewriting PostgreSQL in Rust provide?

Rewriting in Rust aims to improve safety, reduce bugs related to memory management, and enhance overall stability and security, especially in critical infrastructure like databases.

Will the Rust version replace the existing C-based PostgreSQL?

This is still under development. The Rust rewrite is intended to supplement or eventually replace the core system once fully validated and adopted, but transition plans are ongoing.

When can users expect to see the Rust version in production?

The team plans to continue testing over the next several months, with gradual releases expected after comprehensive validation, likely within the next year.

Are there any risks associated with switching to Rust?

As with any major rewrite, risks include compatibility issues, unforeseen bugs, and performance concerns. Extensive testing is ongoing to mitigate these risks before widespread deployment.

Source: hn

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

Top 8 International Watch Brands Defining Luxury and Lifestyle Trends in India

Eight global watch brands are leading luxury and lifestyle trends in India, influencing consumer preferences and market dynamics.

Show HN: Shirei, Cross-platform GUI Framework In Native Go

Shirei is a new open-source GUI framework written in Go, enabling native cross-platform desktop applications with a simple API, announced on Show HN.

Chloé Zhao Is a Spiky, Sparkling Schiaparelli Blowfish at Cannes Film Festival

Chloé Zhao made a striking appearance at Cannes in a surreal Schiaparelli couture gown inspired by blowfish, blending fashion and oceanic symbolism.