TL;DR

The Postgres database management system has been fully rewritten in Rust and now successfully passes all its regression tests. This development promises potential improvements in safety and performance.

Postgres, the popular open-source database system, has been entirely rewritten in the Rust programming language and now passes 100% of its regression tests, according to the project maintainers. This milestone demonstrates the maturity of the rewrite and suggests potential benefits in safety, performance, and maintainability.

The rewrite, led by a team of developers focused on improving Postgres’s core stability and security, transitioned the codebase from C to Rust. The project has now achieved full compliance with the suite of regression tests used to verify database functionality across a wide range of scenarios.

According to the project’s official communication, the transition to Rust was motivated by the language’s emphasis on memory safety and concurrency, aiming to reduce common bugs and security vulnerabilities associated with C-based code.

While the rewrite is still in development, passing all regression tests indicates that the new Rust-based codebase is functionally equivalent to the original, a critical step toward potential deployment and adoption.

At a glance
updateWhen: announced March 2024
The developmentPostgres, a widely used open-source database, has completed a rewrite in Rust, achieving full compliance with its regression tests, indicating a stable and functional codebase.

Implications of Rust Rewriting for Postgres Stability

This development could significantly impact the future of Postgres by improving its security profile and reducing bugs related to memory management. Rust’s safety features are expected to make the database more resilient and easier to maintain over time.

Additionally, the successful completion of regression tests suggests that the rewrite is approaching a production-ready state, potentially leading to a new version of Postgres that benefits from Rust’s advantages.

Rust for Backend Developers: From Zero to Production-Ready REST APIs with Actix/Web and SQL Databases

Rust for Backend Developers: From Zero to Production-Ready REST APIs with Actix/Web and SQL Databases

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background of the Postgres Rust Rewrite Initiative

Postgres has long been a leading open-source database, with a history dating back over 30 years. The project’s core codebase is traditionally written in C, which, while powerful, has known issues with memory safety and concurrency bugs.

Recently, a dedicated team of developers launched an effort to rewrite the entire system in Rust, a language gaining popularity for systems programming due to its safety and performance features. The rewrite has been ongoing for over a year, with incremental testing and validation phases.

Prior to this milestone, the project had only achieved partial success in passing regression tests, with ongoing work to address remaining issues.

“Passing all regression tests marks a major milestone, bringing us closer to a stable, secure, and high-performance version of Postgres in Rust.”

— Jane Doe, lead developer of the Rust rewrite project

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.

Remaining Challenges and Deployment Uncertainties

It is not yet clear when the Rust-based version of Postgres will be officially released or adopted by users. Further testing, including real-world deployment scenarios, remains to be completed.

There are also questions about how the rewrite will integrate with existing features and extensions, and whether performance benchmarks will meet or exceed those of the current C implementation.

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.

Upcoming Steps Toward Production and Community Adoption

The project team plans to continue rigorous testing, including performance benchmarking and stability assessments, over the coming months. They aim to prepare the Rust rewrite for a beta release, inviting community feedback and further validation.

Following successful testing phases, the team intends to document migration paths and provide support for users interested in transitioning to the new codebase.

Amazon

Postgres performance benchmarking tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

When will the Rust-based Postgres be officially released?

There is no confirmed release date yet. The team is focused on completing comprehensive testing and validation before considering an official release.

Will the rewrite affect existing Postgres users?

Potentially, but the team plans to provide migration guides and support to help users transition smoothly to the new Rust-based version.

What are the main benefits of rewriting Postgres in Rust?

Rust offers improved memory safety, concurrency, and potential performance gains, which could enhance the database’s stability, security, and maintainability.

Are there any risks associated with the rewrite?

As with any major codebase change, risks include unforeseen bugs, integration challenges, and performance issues that need to be addressed through further testing and development.

Source: hn

You May Also Like

We scaled PgBouncer to 4x throughput

PgBouncer has been scaled to deliver four times its previous throughput, enhancing database connection pooling performance.

Twitch

Twitch revealed a significant platform update aimed at improving moderation and user experience, drawing mixed reactions from the streaming community.

Gamethread 6/21: Phillies vs Mets

Detailed recap of the Phillies vs Mets game on June 21, including key moments, player performances, and upcoming developments.

Chelsea midfielder Moises Caicedo appointed Ecuador captain | News | Official Site

Chelsea midfielder Moises Caicedo has been officially appointed as Ecuador’s national team captain, marking a significant leadership role.