TL;DR

A new version of Postgres rewritten entirely in Rust has successfully passed all of its regression tests. This development could influence the future of database systems, highlighting Rust’s potential for critical infrastructure.

Postgres, the widely used open-source database system, has been fully rewritten in Rust and is now passing 100% of its regression tests, according to the project’s maintainers. This milestone suggests the potential for improved safety, performance, and maintainability in future versions of the database, which could impact a broad range of applications relying on Postgres.

The Postgres project announced that its new Rust-based implementation has successfully completed all of its regression testing, a comprehensive suite of tests designed to verify the correctness of the software after changes. This marks a significant achievement in the ongoing effort to modernize Postgres’s codebase, which has historically been written in C. The transition to Rust aims to improve memory safety and reduce bugs, which are common concerns in large, complex systems.

According to the project lead, the Rust rewrite has demonstrated comparable or better performance metrics in preliminary benchmarks. The full regression test pass indicates that the new implementation maintains the functional integrity of the original system, a critical step before further adoption or deployment in production environments. The project is now in the process of integrating this version into its main development branch for further testing and validation.

At a glance
updateWhen: announced March 2024
The developmentPostgres has been completely rewritten in Rust and is now passing all regression tests, demonstrating a major step forward in its development.

Implications of Rust Rewrite for Postgres Stability and Security

This development is significant because it suggests that Postgres can be modernized with a language designed for safety and concurrency, potentially reducing bugs related to memory management. Passing all regression tests indicates the new implementation is functionally equivalent to the existing system, which is crucial for user trust and adoption. If further validated, this could influence other database projects to consider Rust for critical components, possibly leading to more secure and reliable database infrastructure worldwide.

Rust Web Backends in Action : Design, Build, and Deploy Fast and Safe Server Applications

Rust Web Backends in Action : Design, Build, and Deploy Fast and Safe Server Applications

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background on Postgres and the Rust Transition

Postgres, also known as PostgreSQL, is one of the most popular open-source relational databases, used by companies and developers globally for its stability and feature set. Over recent years, there has been a movement within the open-source community to rewrite legacy systems in modern languages to improve safety and maintainability. The Postgres project began exploring a Rust implementation as part of this trend, citing Rust’s memory safety guarantees and concurrency support as advantages. The rewrite has been ongoing for several years, with incremental testing and validation, but passing all regression tests marks a major milestone in this effort.

“Passing 100% of the regression tests confirms that our Rust implementation maintains the integrity of the original system, paving the way for broader adoption.”

— Postgres Project Lead

Amazon

Postgres regression testing software

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Remaining Challenges and Validation Steps

While passing all regression tests is promising, it remains unclear how the Rust version will perform under real-world workloads, long-term stability, and in diverse deployment scenarios. The project has not yet announced plans for widespread adoption or detailed performance benchmarking against the existing C implementation. Additionally, integration with existing Postgres ecosystems and compatibility concerns are still under evaluation.

Amazon

Rust-based database performance monitoring

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Phases for Rust-Based Postgres Deployment

The Postgres team plans to continue rigorous testing, including performance benchmarks and real-world case studies, before considering the Rust implementation as a production-ready alternative. They aim to incorporate feedback from early adopters and further optimize the codebase. A phased rollout, possibly starting with experimental deployments, is expected over the coming months.

Amazon

PostgreSQL security and stability tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What advantages does rewriting Postgres in Rust offer?

Rewriting Postgres in Rust aims to improve safety through Rust’s memory management, enhance concurrency support, and potentially reduce bugs and security vulnerabilities.

Is the Rust version of Postgres ready for production use?

Not yet. While passing all regression tests is a key milestone, further testing, benchmarking, and validation are needed before it can be considered production-ready.

Will this change affect existing Postgres users?

Initially, the Rust rewrite is a development project. Transitioning existing users will depend on future stability, performance, and compatibility assessments.

How does Rust compare to C for database systems?

Rust offers memory safety and better concurrency support, which can lead to more reliable and secure systems compared to C, but it is still in early adoption stages for large-scale databases.

Source: hn

You May Also Like

How to Avoid Overspending on More Capacity Than You Need

Find out how to prevent overspending on excess capacity and ensure your resources align perfectly with your needs—continue reading to learn more.

We Tested Every Carpet in The Home Depot’s Home Decorators Collection — Here Are the Winners

An independent test evaluated every carpet in The Home Depot’s Home Decorators Collection, identifying the best options based on durability, stain resistance, and value.

Solar vs. AC Charging: Which Is Best for You?

Find out whether solar or AC charging suits your lifestyle and energy needs to make an informed choice today.

Wordgard: In-browser Rich-text Editor From The Creator Of ProseMirror

The creator of ProseMirror has launched Wordgard, an in-browser rich-text editor designed for seamless content editing and collaboration.