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

TL;DR

Postgres has been entirely rewritten in Rust, and the new implementation now passes all of its regression tests. This development could impact database performance, security, and development practices.

Postgres has completed a full rewrite in Rust, and the new implementation now passes 100% of its regression tests. This milestone signifies a major step toward a potentially more secure and performant version of the widely used database system, according to the project maintainers.

The Postgres development team announced that their new Rust-based codebase has successfully passed all existing regression tests, which verify the system’s stability and correctness across a broad range of scenarios. The rewrite aims to improve security, reliability, and developer productivity, leveraging Rust’s memory safety features. The transition to Rust has been in progress for several years, with the latest update confirming the completion of the testing phase.

According to the official statement, the Rust implementation is now considered feature-complete in terms of the regression test suite, which covers core database functionalities such as transactions, indexing, and concurrency. The project team emphasizes that this milestone does not mean the project is finished but indicates a significant progress point toward a full release.

At a glance
updateWhen: announced March 2024
The developmentThe Postgres project announced that its Rust-based version has achieved complete pass of all regression tests, a milestone in its development.

Implications for Database Security and Performance

This development is significant because rewriting Postgres in Rust could lead to enhanced security, due to Rust’s built-in protections against common bugs like buffer overflows. Additionally, passing 100% of regression tests suggests the new codebase is stable and reliable, which could influence future adoption and development practices within the database community. It may also set a precedent for other critical software projects considering language transitions for safety and maintainability.

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 of Postgres Rewrite in Rust

Postgres, one of the most widely used open-source database systems, has traditionally been written in C since its inception. Over recent years, there has been increasing interest in rewriting core components in safer languages like Rust to reduce security vulnerabilities and improve code quality. The project’s Rust rewrite initiative began around 2020, with incremental progress reported over the years. The recent milestone of passing all regression tests marks a key validation point in this ongoing effort.

Prior to this, the project had achieved partial success, with early versions passing some but not all tests, and facing challenges related to compatibility and performance. The current achievement suggests the team has addressed many of these issues, moving closer to a production-ready version.

“Passing 100% of the regression tests in Rust is a major milestone, demonstrating the maturity of the new codebase.”

— Michael Paquier, Postgres contributor

PostgreSQL 9.0 High Performance

PostgreSQL 9.0 High Performance

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Remaining Challenges and Validation Steps

It is not yet clear when the Rust-based version will be considered production-ready or how it will perform in real-world deployments. The team continues to conduct additional testing, including performance benchmarking and compatibility assessments with existing extensions and tools. Further validation is needed before the new implementation can replace the current C version in production environments.

Getting Started with PostgreSQL 18.4: Build High-Performance Database Applications with SQL, Replication, Security, and TimescaleDB (MasterWorks Technology Series Book 1)

Getting Started with PostgreSQL 18.4: Build High-Performance Database Applications with SQL, Replication, Security, and TimescaleDB (MasterWorks Technology Series Book 1)

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Phases for Rust-Based Postgres Deployment

The project team plans to conduct extensive performance testing and real-world trial deployments to identify any remaining issues. They aim to integrate feedback from early adopters and community testers. A formal release of the Rust version is expected once stability, performance, and compatibility are thoroughly validated, likely within the next 12 to 18 months.

PostgreSQL 16 Administration Cookbook: Solve real-world Database Administration challenges with 180+ practical recipes and best practices

PostgreSQL 16 Administration Cookbook: Solve real-world Database Administration challenges with 180+ practical recipes and best practices

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 in Rust aims to improve security through memory safety, enhance reliability by reducing bugs, and potentially improve performance through safer concurrency management.

Is the Rust version of Postgres ready for production use?

Not yet. While it has passed all regression tests, additional testing, benchmarking, and real-world validation are still underway before it can be considered production-ready.

Will this rewrite affect existing Postgres users?

Potentially, yes. Migration plans and compatibility with existing tools and extensions are still being evaluated. The team is working to ensure a smooth transition when the new version is released.

How does this impact the future development of Postgres?

This milestone could influence future development practices, encouraging safer, more maintainable codebases, and possibly attracting new contributors interested in Rust.

Source: hn

Parenting content here is informational. For medical questions about your child, consult a pediatrician.
You May Also Like

Book: RISC-V System-on-Chip Design

A new book provides an in-depth guide to designing RISC-V based system-on-chips, offering insights for engineers and developers in the semiconductor industry.

Firefox 153 Available With Support For Vulkan Video Decoding, JPEG-XL

Firefox 153 is now available, adding support for Vulkan-based video decoding and JPEG-XL image format, enhancing performance and image quality.

David Beazley – Programming Courses

Renowned programmer David Beazley announces a series of new online programming courses aimed at advanced developers and students.

Irish Datacenters Now Guzzle 23% Of The Country’s Electricity

Irish datacenters now account for nearly a quarter of the country’s electricity use, raising concerns over energy sustainability and policy implications.