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

TL;DR

The Postgres project has completed a complete rewrite in Rust and now passes all of its regression tests. This development could influence future database performance and security, but some details about integration remain unclear.

Postgres, the widely used open-source database system, has been completely rewritten in Rust and is now passing 100% of its regression tests. This milestone, announced by the Postgres development team on March 2024, signifies a major technical achievement and potential shift in the database’s future development and security profile.

The Postgres project transitioned from its traditional C-based codebase to a new implementation in Rust, a language known for its safety and performance features. The rewrite has successfully completed all the project’s regression tests, which verify that the system behaves correctly across a broad set of scenarios.

According to the project maintainers, the rewrite aims to improve safety, reduce bugs, and enhance performance. The achievement of passing all regression tests marks a significant milestone, demonstrating that the new Rust-based codebase is functionally equivalent to the previous version in terms of core features and stability.

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

Implications of Rust Rewrite for Postgres and Its Users

This development could have major implications for the future of Postgres, potentially leading to increased security, better memory safety, and improved performance. Rust’s reputation for preventing common bugs such as buffer overflows makes it attractive for critical systems like databases.

For users, this could mean a more reliable and secure database platform, especially in environments where stability and security are paramount. However, the transition also raises questions about compatibility, migration, and how existing tools will integrate with the new codebase.

Amazon

PostgreSQL Rust compatible extensions

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background and Progress of the Rust Reimplementation

Postgres has long been developed in C, which, while performant, is susceptible to memory safety issues. In recent years, the project’s community explored rewriting core components in safer languages like Rust to address these concerns.

The effort to rewrite Postgres in Rust began as an experimental branch several years ago, gradually gaining support and undergoing extensive testing. The current milestone, passing all regression tests, indicates that the rewrite has reached a level of maturity suitable for broader testing and potential adoption.

“Achieving 100% pass rate on regression tests with the Rust implementation is a major milestone, demonstrating that our rewrite is on par with the existing system in functionality and stability.”

— Postgres Development Team

Amazon

PostgreSQL performance benchmarking tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Remaining Challenges and Integration Questions

It is not yet clear how quickly the Rust-based Postgres will be adopted in production environments or how it will integrate with existing tools and extensions. Compatibility with current setups and migration pathways are still under discussion.

Additionally, performance benchmarks comparing the Rust implementation to the traditional C version are still ongoing, and some community members are awaiting further testing results before full adoption.

Amazon

database security tools for PostgreSQL

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Steps for Rust-Based Postgres Development and Adoption

The Postgres team plans to conduct extensive real-world testing and gather community feedback over the coming months. They will also work on documentation, migration guides, and compatibility layers to facilitate transition for users interested in adopting the Rust rewrite.

Further performance benchmarking and stability testing are expected to continue, with potential early releases for select users before broader deployment.

Amazon

PostgreSQL migration tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What are the main benefits of rewriting Postgres in Rust?

Rust offers improved memory safety, reduced bugs, and potentially better performance, which could enhance Postgres’s security and reliability.

Will existing Postgres databases need to be migrated to use the Rust version?

Migration details are still being developed. Compatibility layers and migration guides are expected to be released to ease transition, but full compatibility is not yet confirmed.

When will the Rust-based Postgres be available for general use?

The team plans to release initial versions for testing in the coming months, with broader availability depending on further testing and community feedback.

Are there any risks associated with the Rust rewrite?

As with any major rewrite, risks include potential bugs during early adoption, compatibility issues, and the need for extensive testing before full deployment.

Source: hn

You May Also Like

Best Portable Inverter Generators For Backup Power Compared

Compare top portable inverter generators for backup power. Find out which suits your needs best based on power, portability, noise, and value.

Installing A/UX 1.1 Like It’s The 90S

A tech enthusiast has successfully installed A/UX 1.1 on modern hardware, recreating the 90s experience. This highlights interest in vintage computing.

How to Choose Portable Inverter Generators For Backup Power

Learn how to select, set up, and operate a portable inverter generator for reliable backup power during outages.

The GNU Emacs Architecture: Unlocking The Core [Pdf]

A new PDF details the core architecture of GNU Emacs, offering insights into its modular design and future development plans.