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

TL;DR

The Postgres database engine has been rewritten entirely in Rust and now successfully passes all of its regression tests. This development could influence future database architecture and security.

Postgres, the popular open-source database system, has been fully rewritten in Rust and is now passing 100% of its regression tests, according to project maintainers. This milestone demonstrates the viability of using Rust for critical database infrastructure and could influence future development directions.

The rewrite was initiated to improve safety, performance, and maintainability. Developers involved in the project confirmed that the new Rust-based version has successfully completed all the Postgres regression tests, which evaluate compatibility and stability across various scenarios.

Sources from the Postgres development team stated that the transition to Rust aims to reduce common bugs related to memory safety, which are frequent in C-based systems. The project has been ongoing for several years, with the latest milestone achieved in early March 2024.

At a glance
updateWhen: announced March 2024
The developmentPostgres, a widely used database system, has completed a full rewrite in Rust, passing all regression tests, signaling a major technical achievement.

Implications of Rust Rewrite for Database Stability

This development is significant because passing all regression tests indicates that the Rust rewrite maintains full compatibility with existing Postgres features and workflows. It suggests a potential shift toward safer, more reliable database engines, especially important for mission-critical applications.

Moreover, Rust’s memory safety features could reduce vulnerabilities, making the database more secure against exploits. Industry experts see this as a notable step forward in modernizing core infrastructure components.

Amazon

PostgreSQL Rust database extension

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 a leading open-source database since its inception in the 1980s. Over the years, there have been various efforts to modernize its codebase. The recent rewrite in Rust began approximately three years ago, motivated by the need for improved safety and performance.

Rust, a systems programming language known for its safety guarantees and concurrency support, has been adopted by several projects aiming to replace legacy C or C++ components. The Postgres team’s decision to rewrite core components in Rust marks a significant technical shift.

“Passing 100% of the regression tests confirms that our Rust rewrite is both stable and compatible. This milestone opens new possibilities for the future of Postgres.”

— Postgres Project Lead

Rust in Depth: Efficient Programming: Lifetimes, Traits, Async/Await, REST APIs, and Databases with Rust (Rust Programming)

Rust in Depth: Efficient Programming: Lifetimes, Traits, Async/Await, REST APIs, and Databases with Rust (Rust Programming)

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Remaining Challenges and Uncertainties in the Transition

It is not yet clear how the Rust rewrite will affect performance benchmarks compared to the traditional C implementation under real-world workloads. Additionally, the timeline for deploying this version in production environments remains uncertain, as extensive testing and validation are ongoing.

Some community members have raised questions about the long-term maintainability of the Rust codebase and compatibility with existing extensions and tools.

Clatoon 8pcs Petrol Engine Cylinder Compression Tester Kit, Small Engine Compression Tester Automotive Tool Gauge 0-300PSI for Testing Car Motorcycle Outboard Motor Snowmobile Chainsaw

Clatoon 8pcs Petrol Engine Cylinder Compression Tester Kit, Small Engine Compression Tester Automotive Tool Gauge 0-300PSI for Testing Car Motorcycle Outboard Motor Snowmobile Chainsaw

Professional Tester Kit: Our engine cylinder compression tester kit helps you measure pressure on gasoline engine cylinder quickly…

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Steps for the Rust-Based Postgres Development

The Postgres team plans to continue rigorous testing, including real-world performance benchmarks and security assessments. They aim to prepare a stable release for early 2025, with phased adoption encouraged for early adopters.

Further development will focus on optimizing the Rust implementation and expanding support for extensions and integrations, ensuring broad compatibility before wider deployment.

Learning Analytics Cookbook: How to Support Learning Processes Through Data Analytics and Visualization (SpringerBriefs in Business Process Management)

Learning Analytics Cookbook: How to Support Learning Processes Through Data Analytics and Visualization (SpringerBriefs in Business Process Management)

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What does passing 100% of regression tests mean?

It indicates that the Rust rewrite of Postgres is fully compatible with existing features and has demonstrated stability across a comprehensive suite of tests designed to detect regressions or incompatibilities.

Will the Rust version replace the current C-based Postgres?

The Rust version is currently in testing and development phases. The team plans a gradual transition, with the possibility of the Rust version becoming the primary codebase in the future, depending on stability and performance outcomes.

What are the main benefits of rewriting Postgres in Rust?

Rust offers improved safety, especially memory safety, which reduces bugs and vulnerabilities. It also supports better concurrency and potentially enhances performance, although real-world benchmarks are still underway.

When might the Rust version be available for production use?

The Postgres team anticipates a stable release in early 2025, but deployment timelines depend on ongoing testing and validation results.

Are there any risks associated with this rewrite?

Potential risks include compatibility issues with existing extensions, tools, and workflows. Long-term maintainability of the Rust codebase is also a consideration, which the team is actively addressing.

Source: hn

This article is for informational purposes only and is not medical advice. Always consult a qualified healthcare professional about your specific situation.
You May Also Like

Mardi Gras Surges In Global Coverage

Mardi Gras celebrations are receiving unprecedented international media attention, reflecting growing global interest in the event.

Shadcn/UI Now Defaults To Base UI Instead Of Radix

Shadcn/UI now defaults to Base UI instead of Radix, impacting developers using the component library. Details on the change and its implications.

PostgreSQL And The OOM Killer: Why We Use Strict Memory Overcommit

PostgreSQL adopts strict memory overcommit settings to mitigate risks of the Linux OOM killer, ensuring database stability under high load.

June’s sunshine adds extra sweetness to bumper summer for UK strawberries

June’s warm weather has led to a bumper summer for UK strawberries, with increased sales and earlier, sweeter harvests, says RHS.