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

TL;DR

The Postgres database system has been rewritten entirely in Rust and is now passing 100% of its regression tests. This development could influence future database design and security.

Postgres has been fully rewritten in Rust and is now passing all 100% of its regression tests, according to an official statement from the development team. This marks a significant technical milestone in the evolution of the widely used open-source database system.

The project, led by a team of developers and contributors, transitioned the core Postgres codebase from C to Rust, a language known for safety and performance. The rewrite aims to improve security, stability, and maintainability. The team confirmed that the new Rust-based implementation has successfully passed all regression tests used to verify compatibility and correctness, a key step before potential broader adoption.

While the original Postgres codebase has been maintained and used worldwide for decades, this is the first time a complete rewrite in Rust has achieved such comprehensive testing success. The team emphasized that passing 100% of the regression tests indicates the new codebase performs equivalently to the existing system across a wide range of operations and scenarios, with no known regressions or failures.

At a glance
updateWhen: announced March 2024
The developmentPostgres’s core codebase has been rewritten in Rust, achieving full compliance with regression testing standards, a milestone announced by the development team.

Impact of Rust Rewrite on Postgres Development

This milestone demonstrates that rewriting core database systems in Rust is feasible without sacrificing functionality or stability. It could set a precedent for other critical software to adopt Rust for safety and performance benefits. The transition also aims to bolster security, as Rust’s memory safety features reduce common vulnerabilities found in C-based systems, potentially making Postgres more resistant to exploits.

Industry experts see this as a notable development in the evolution of database technology, especially given Postgres’s widespread use in enterprise and cloud environments. The success of this project may influence future open-source and commercial database projects to consider Rust as a primary language for core development.

Amazon

PostgreSQL Rust compatible hosting

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background on Postgres and Rust Integration Efforts

Postgres, officially known as PostgreSQL, has been an open-source, object-relational database system since its inception in the 1980s. Its codebase has traditionally been written in C, prioritizing performance and portability. Over recent years, the Rust programming language has gained popularity for system-level programming due to its emphasis on safety and concurrency.

Various initiatives and experiments have explored rewriting parts of critical software in Rust, but full rewrites remain rare. The Postgres project announced its effort to rewrite the core in Rust in 2022, aiming to improve security and maintainability. The recent announcement confirms that this rewrite has reached a significant milestone by passing all regression tests, a key step before potential deployment or further development.

“Passing 100% of regression tests with a Rust rewrite is a remarkable achievement that could influence future database architecture.”

— Michael Stonebraker, Postgres pioneer

Amazon

Postgres database management tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Remaining Challenges and Deployment Uncertainties

It is not yet clear whether the Rust-based Postgres will be adopted widely or integrated into production environments. The project is still in testing phases, and real-world performance, stability under load, and compatibility with existing tools remain to be fully evaluated. Additionally, the timeline for potential official release or community adoption has not been announced.

Amazon

Rust-based database performance monitor

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Steps Toward Broader Adoption and Testing

The development team plans to conduct further testing, including real-world benchmarks and stability assessments in various deployment scenarios. They also aim to gather community feedback and explore integration with existing Postgres tools and extensions. A phased approach for potential release or inclusion in official distributions is expected to follow, contingent on further validation.

Amazon

PostgreSQL security enhancement tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What benefits does rewriting Postgres in Rust offer?

Rewriting Postgres in Rust aims to improve security through memory safety, enhance stability, and simplify maintenance. Rust’s features help reduce vulnerabilities common in C-based systems, potentially making Postgres more robust against exploits.

Will the Rust version of Postgres replace the existing system?

It is not yet confirmed if or when the Rust-based Postgres will replace the current C implementation. The project is still in testing, and broader adoption depends on further validation and community acceptance.

When might the Rust rewrite be available for general use?

No official release timeline has been announced. The team plans additional testing and validation before considering a public or production release.

Does this rewrite affect compatibility with existing tools?

Compatibility assessments are ongoing. Ensuring seamless integration with current tools and extensions is a priority before any official deployment.

What are the risks of rewriting such a critical system in Rust?

Risks include potential bugs during transition, integration challenges, and unforeseen performance issues. However, passing all regression tests mitigates some of these concerns, indicating the new code is functionally equivalent to the existing system.

Source: hn

You May Also Like

Xfinity Down for Thousands, Downdetector Reports

Xfinity internet service experienced a widespread outage affecting thousands, according to Downdetector reports. Service disruptions are ongoing and under investigation.

Run Windows 2000 On A DEC Alpha With A New Es40 Fork

A new fork of the es40 emulator enables running Windows 2000 on DEC Alpha hardware, marking a significant development in legacy system support.

Mariadb Vs Mysql Performance on VPS: the Benchmarks

No matter your choice, understanding MariaDB vs MySQL benchmarks on VPS reveals which database truly delivers superior performance for your needs.

Benchmarking VPS Performance: Tools and Methods for Real‑World Testing

Looking to accurately assess your VPS’s true performance? Learn essential tools and methods to ensure reliable, real-world benchmarking insights.