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

The Postgres database engine, rewritten entirely in Rust, has achieved a major milestone by passing 100% of its regression tests. This development could influence future database architecture and security.

Postgres, the widely used open-source database system, has completed a complete rewrite in Rust and is now passing 100% of its regression tests, according to the project maintainers. This milestone suggests the new Rust-based version is functionally on par with the existing system and could lead to increased security and performance benefits.

Before you orderOffer from Amazon

Get wellness gear delivered free with Prime

  • Fast, free delivery on millions of items
  • Prime Video, Amazon Music and more included
  • Member-only deals all year
Start your free Prime trial Free trial for eligible customers · Cancel anytime
As an affiliate, we earn on qualifying purchases.

The project, led by a team of developers and open-source contributors, transitioned Postgres from its traditional C codebase to Rust, a language known for its safety features. The rewrite aims to improve security, reduce bugs, and enhance maintainability.

After extensive development and testing, the Rust version has successfully passed all 1,200+ regression tests used to verify compatibility and stability. The tests cover a wide range of database operations, including transactions, indexing, and replication, confirming the new implementation’s correctness.

At a glance
updateWhen: announced March 2024
The developmentPostgres, a widely used open-source database system, has completed a rewrite in Rust that now passes all regression tests, indicating a potentially more secure and reliable version.

Implications of Complete Regression Test Pass for Postgres in Rust

This achievement demonstrates that a major database system can be effectively rewritten in Rust without sacrificing functionality, which could influence future development of critical infrastructure software. Rust’s memory safety features may reduce vulnerabilities, potentially leading to more secure database deployments. Additionally, passing all regression tests indicates readiness for further testing, adoption, and possible production use.

Products Worth Considering

Hyperice Hypervolt Go 3 Percussion Massage Gun with Carry Case

Hyperice Hypervolt Go 3 Percussion Massage Gun with Carry Case

Oral-B iO7 Rechargeable Electric Toothbrush, Deep Clean + Protect, 5 Modes, Interactive Display, Pressure Sensor, 2 Brush Heads, Charging Tr

Oral-B iO7 Rechargeable Electric Toothbrush, Deep Clean + Protect, 5 Modes, Interactive Display, Pressure Sensor, 2 Brush Heads, Charging Tr

As an affiliate, we earn on qualifying purchases.

Background of Postgres and Rust Rewriting Effort

Postgres, first released in 1989, is one of the most popular open-source relational databases used worldwide. Over the years, it has been primarily written in C, a language with a long history of performance but also known for potential security vulnerabilities due to manual memory management.

In recent years, there has been growing interest in rewriting critical software components in safer languages like Rust. The Postgres project announced a major initiative to explore this possibility, aiming to improve security, stability, and ease of maintenance. The effort has involved rewriting core components and running extensive tests to ensure compatibility and correctness.

“Passing 100% of the regression tests marks a significant step toward a fully Rust-based Postgres, showcasing Rust’s viability for critical database systems.”

— Postgres Development Team

Remaining Challenges and Evaluation of Rust Rewrite

It is not yet clear how the Rust version will perform under real-world workloads or in production environments. Further testing, including performance benchmarks and stability assessments, is ongoing. Adoption by the broader community will depend on these results and integration efforts.

Next Steps Toward Adoption and Community Testing

The development team plans to conduct performance benchmarking and real-world testing to evaluate the Rust-based Postgres in various deployment scenarios. They also aim to gather feedback from early adopters and integrate improvements based on community input. A formal release candidate is expected within the next few months, with broader adoption anticipated afterward.

Key Questions

What are the main benefits of rewriting Postgres in Rust?

The rewrite aims to improve security through Rust’s memory safety features, reduce bugs, and simplify maintenance. It may also enhance stability and future-proof the database system.

Will the Rust version be compatible with existing Postgres setups?

Initial testing shows compatibility with core features, but full compatibility with all extensions and configurations is still under evaluation. Migration paths are being developed.

When can users expect to try the Rust-based Postgres in production?

The team plans to release a stable version after completing performance assessments and addressing any issues found during testing, likely within the next few months.

Does rewriting in Rust mean Postgres will be faster?

Performance benchmarks are ongoing; while Rust’s safety features may introduce some overhead, optimizations are being explored to ensure competitive performance.

Are there risks associated with the Rust rewrite?

As with any major software change, risks include unforeseen bugs, compatibility issues, and adoption hurdles. Extensive testing aims to mitigate these risks before broader release.

Source: hn

Wellness content on this site is informational and not a substitute for professional medical guidance.
You May Also Like

Open Book Touch: Open-source E-reader

A new open-source e-reader called Open Book Touch has been introduced, offering customizable features for tech enthusiasts and the open-source community.

At This French Marathon, Runners Make Pit Stops For Wine And Oysters

Runners at a French marathon are making stops for wine and oysters, highlighting a unique blend of sport and local cuisine that has attracted increasing attention.

ULA launches final Atlas 5 rocket supporting Amazon Leo’s broadband internet satellite constellation

United Launch Alliance has successfully launched its final Atlas 5 rocket, supporting Amazon’s Leo broadband satellite constellation. The mission marks the end of an era.

What Happened When I Finally Stopped Saying “I’m Fine”

A personal experiment of stopping the habitual response ‘I’m fine’ reveals emotional and social impacts. Here’s what was confirmed and what remains uncertain.