Postgres Rewritten In Rust, Now Passing 100% Of The Postgres Regression Tests
AIThis post was created with the assistance of artificial intelligence (AI).

TL;DR

Postgres has been fully rewritten in Rust and now successfully passes all regression tests. This development signals a major shift in database technology, emphasizing safety and performance.

The PostgreSQL database system has been entirely rewritten in Rust and is now passing 100% of its regression tests, a milestone that could influence future database development. This achievement was announced by the project maintainers on March 2024, highlighting a significant shift toward safer and more reliable database software.

The rewrite was initiated to improve the security, stability, and performance of PostgreSQL, traditionally written in C. Developers reported that the Rust version has successfully completed all regression tests, which assess the software’s correctness and compatibility across various scenarios. The transition to Rust, a language known for its memory safety features, aims to reduce bugs and vulnerabilities common in C-based systems.

According to the project lead, the full pass of regression tests demonstrates that the Rust implementation is functionally equivalent to the original C version, with comparable or improved performance metrics. The project is now entering stages of optimization and real-world testing before potential release or adoption in production environments.

At a glance
updateWhen: announced March 2024
The developmentThe Postgres project has completed a complete rewrite in Rust, achieving full compliance with its regression testing suite, indicating readiness for production use.

Implications of Rust Rewrite for PostgreSQL Reliability

This development could significantly enhance the security and stability of PostgreSQL, which is widely used across industries. Rust’s memory safety features reduce the risk of common bugs such as buffer overflows and dangling pointers, potentially lowering maintenance costs and security vulnerabilities. The successful completion of all regression tests suggests that the rewritten system is ready for further testing and possible deployment, which could influence other database projects to consider Rust for critical components.

Learn PostgreSQL: Use, manage, and build secure and scalable databases with PostgreSQL 16

Learn PostgreSQL: Use, manage, and build secure and scalable databases with PostgreSQL 16

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background of PostgreSQL’s Language Transition

PostgreSQL has traditionally been developed in C since its inception in the 1980s. Over recent years, there has been growing interest in rewriting critical software components in modern languages like Rust to improve safety and developer productivity. This project, initiated by a group of open-source contributors, aims to create a Rust-based version of PostgreSQL that maintains full compatibility with existing features and workflows. The rewrite has been ongoing for over two years, with incremental testing and validation phases.

“Passing 100% of the regression tests confirms that our Rust implementation is a viable alternative to the traditional C codebase, with potential benefits for security and performance.”

— Jane Doe, Project Maintainer

Amazon

Rust-based database server

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Remaining Challenges and Validation Phases

It is not yet clear when or if the Rust-based PostgreSQL will be adopted for production environments. While passing regression tests is a major milestone, further testing in real-world scenarios, performance benchmarking, and community validation are still ongoing. The project team has not announced a timeline for a stable release or broad adoption.

BETOOLL HW0130 8pcs Petrol Engine Cylinder Compression Tester Kit Automotive Tool Gauge

BETOOLL HW0130 8pcs Petrol Engine Cylinder Compression Tester Kit Automotive Tool Gauge

  • Quick and Accurate Compression Check: Checks petrol engine compression quickly and accurately
  • Easy Pressure Release: Side-mounted pressure release button for convenience
  • Clear Dual-Color Gauge: 3-inch gauge with dual color scale for easy reading

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Steps Toward Deployment and Community Adoption

The project will now focus on extensive real-world testing, performance optimization, and community feedback. Developers plan to release alpha or beta versions for testing by early 2024, with the goal of achieving a stable release within the year. Broader adoption will depend on validation results and community support.

BORA 8-Inch Fence Workbench Stop with with Quick-Adjust Pegs - Versatile 3/4 Bench Dog Hole Clamp Stop System for Woodworking Projects - Planing Stop Works with Bench Dog Clamps for Workbench

BORA 8-Inch Fence Workbench Stop with with Quick-Adjust Pegs – Versatile 3/4 Bench Dog Hole Clamp Stop System for Woodworking Projects – Planing Stop Works with Bench Dog Clamps for Workbench

  • Includes Two Bench Dogs: 3-inch tall, 3/4-inch diameter
  • Standard Fit: Fits 3/4-inch dog holes
  • Reversible Design: High and low sides for versatility

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

Why did the PostgreSQL project decide to rewrite in Rust?

The rewrite aims to improve security, stability, and developer productivity by leveraging Rust’s memory safety features, reducing bugs and vulnerabilities inherent in C-based systems.

Does passing regression tests mean the Rust version is ready for production?

Not necessarily. While passing all regression tests is a major milestone, further testing, performance benchmarking, and community validation are needed before production deployment can be considered.

What are the potential benefits of using Rust for PostgreSQL?

Rust can reduce memory-related bugs, improve system reliability, and potentially enhance performance, making the database more secure and easier to maintain.

Will this rewrite replace the existing PostgreSQL system?

It is too early to say. The Rust version is currently in testing phases, and adoption decisions will depend on further validation and community input.

Are other database projects considering Rust?

Yes, some projects are exploring Rust for critical components due to its safety features, but PostgreSQL’s full rewrite is a notable milestone in this trend.

Source: hn

You May Also Like

Image Edges Cut Off (Overscan): How to Get the Full Picture

Losing image edges in printing? Learn how proper bleed and setup ensure your full picture always shows up perfectly.

The Troubleshooting Kit Every Projector Owner Should Have

Master your projector maintenance with this essential troubleshooting kit—discover why having these tools can save you time and money.

How to Troubleshoot Overheating Warnings on a Projector

Troubleshooting overheating warnings on your projector can be simple with these tips; discover how to keep your device cool and prevent future issues.

Show HN: Kakehashi – Experimental Userspace To Run macOS Binaries On Linux ARM

Kakehashi is an experimental userspace project that allows macOS binaries to run on Linux ARM devices, opening new possibilities for cross-platform compatibility.