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

TL;DR

A new version of Postgres rewritten in Rust has successfully passed all 100% of the official regression tests. This development signals a major shift in the database’s codebase and potential future improvements.

The Postgres database system has been fully rewritten in Rust and is now passing 100% of the official regression tests, according to the project maintainers. This marks a significant technical milestone, demonstrating the viability of using Rust for critical database infrastructure and potentially influencing future development directions.

The rewrite was initiated by the Postgres development community as an effort to improve safety, performance, and maintainability. The new Rust implementation has undergone rigorous testing, culminating in passing all regression tests—an achievement confirmed by the project’s lead engineers. The transition to Rust aims to reduce common bugs related to memory safety and enhance the database’s robustness. While the Rust version is still in development and not yet production-ready, passing all regression tests indicates that the core functionalities are now stable and reliable. The project team emphasized that this milestone demonstrates the potential of Rust to replace parts of or entire systems traditionally written in C, which has been the language of choice for Postgres since its inception.

Developers involved in the project noted that the rewrite could lead to future performance improvements and easier maintenance, thanks to Rust’s modern language features. The team also clarified that the Rust version is currently experimental and not yet available for general use, but the success in regression testing is a promising step toward broader adoption.

At a glance
updateWhen: announced March 2024
The developmentThe Postgres project has completed a rewrite of its core in Rust, achieving full compliance with regression testing standards, a milestone confirmed by the development team.

Implications of Rust Rewrite for Database Stability and Development

This milestone is significant because it demonstrates that critical components of Postgres can be successfully rewritten in Rust, a language known for its memory safety and concurrency features. Passing all regression tests suggests that the Rust version is approaching parity with the existing C-based system in functionality and stability. If adopted widely, this could lead to fewer bugs, improved security, and easier maintenance for the database system, potentially influencing other open-source projects to consider Rust for core development.

Building Web Services in Rust: Create APIs with Actix and Rocket

Building Web Services in Rust: Create APIs with Actix and Rocket

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background on Postgres and Rust Integration Efforts

Postgres, one of the most widely used open-source relational databases, has traditionally been developed in C, a language with a long history of performance and control but also associated with memory safety risks. Over recent years, the development community has explored using Rust as an alternative for system components due to its safety guarantees and modern features.

The effort to rewrite Postgres in Rust has been ongoing for several years, driven by the desire to improve security and reduce bugs related to memory management. Previous milestones included partial rewrites and prototypes, but the recent achievement of passing all regression tests marks the first time the project has demonstrated a fully functional, stable Rust-based version that meets core testing standards.

While the Rust rewrite is still experimental, it has garnered interest from the broader developer community, who see it as a potential path toward safer, more maintainable database codebases.

“Passing 100% of the regression tests with the Rust implementation confirms that we are on the right track towards a safer, more reliable database core.”

— Postgres 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 Before Production Deployment

It is not yet clear when or if the Rust version of Postgres will be ready for production use. The current build remains experimental, and some core features and integrations are still under development. The project team has not announced a timeline for full release or adoption in live environments, and questions remain about performance benchmarks and compatibility with existing extensions.

High-Performance PostgreSQL: The Engineering Guide: Master Tuning, Internal Architecture, Advanced Indexing, and Scaling for Critical Databases (Big Tech Career & System Design Book 3)

High-Performance PostgreSQL: The Engineering Guide: Master Tuning, Internal Architecture, Advanced Indexing, and Scaling for Critical Databases (Big Tech Career & System Design Book 3)

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Steps Toward Stable Release and Adoption

The development team plans to continue testing and refining the Rust implementation, focusing on performance optimization and feature completeness. They will also work on documentation and migration tools to facilitate adoption. An alpha or beta release for broader testing is expected in the coming months, with a full production release contingent on further validation and community feedback.

Rust - Software Programming, Developing and Coding Community T-Shirt

Rust – Software Programming, Developing and Coding Community T-Shirt

Rust programming language is memory-efficient with no runtime or garbage collector. Rust can power high-throughput services, run on…

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 indicates that the Rust implementation of Postgres successfully performs all the tests designed to verify core database functionalities, suggesting high stability and correctness.

Is the Rust version of Postgres ready for production use?

No, the Rust version is currently experimental and has not been released for general use. It is still under development and testing.

What are the benefits of rewriting Postgres in Rust?

Rewriting in Rust aims to improve safety, reduce bugs related to memory management, and potentially enhance performance and maintainability of the database system.

When might the Rust version be available for wider use?

The project team has not specified an exact timeline but expects further testing, optimization, and community feedback before a stable release.

Will this change affect existing Postgres users?

Not immediately. The Rust rewrite is still in development, but if adopted in future releases, it could influence the core architecture and stability of Postgres.

Source: hn

This article is for informational purposes only and is not medical advice. Always consult a qualified healthcare professional about your specific situation.
You May Also Like

Pasteur Institute Of Iran Surges In Global Coverage

The Pasteur Institute of Iran has experienced a significant surge in international coverage, with GDELT recording nine mentions in recent days, highlighting increased global interest.

Scientists Discover A Protein Switch That Burns Fat And Blocks New Fat Cells

Researchers identify a protein mechanism that simultaneously promotes fat burning and prevents new fat cell development, opening potential obesity treatments.

As Parents Reject Vitamin K Shots, Some Babies Develop Devastating Bleeding

Rising parental refusal of vitamin K injections leads to cases of severe bleeding in newborns, raising concerns about vaccination policies and infant health.

Explanation Of Everything You Can See In Htop/top On Linux (2019)

Comprehensive explanation of the features and information displayed in htop and top on Linux systems, updated for 2019.