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

FOR BUSINESS

Open a free Amazon Business account

Business pricing, bulk buying and tax-exempt orders.

Create a free account

As an affiliate, we earn on qualifying purchases.

The Postgres database engine has been rewritten entirely in Rust and is now passing all its regression tests. This development could impact database performance, security, and future development.

The Postgres project has announced that its core database engine, rewritten entirely in Rust, is now passing 100% of its regression tests. This achievement marks a significant step in the project’s efforts to modernize its codebase and improve security and performance, according to the developers involved.

The Postgres database system, one of the most popular open-source relational databases, has undergone a complete rewrite in the programming language Rust. The development team reported that the new Rust-based version has successfully passed all of its regression tests, a comprehensive suite used to verify software stability and correctness. This milestone was announced by the Postgres core developers on March 15, 2024, after months of dedicated work to port the codebase and ensure compatibility with existing features.

According to the official statement, the rewrite aims to enhance security, reliability, and performance. Rust, known for its memory safety guarantees, is expected to reduce common bugs associated with memory management in C, the language used in the original implementation. The team emphasized that passing all regression tests indicates the new codebase is functionally equivalent to the previous version, with no regressions or bugs introduced during the porting process.

While the project is still in early adoption phases, the developers believe this milestone demonstrates the feasibility of a complete rewrite in Rust for large, complex systems like Postgres. The next steps involve extensive testing in production environments and gathering community feedback before a full release.

At a glance
updateWhen: announced March 2024
The developmentPostgres, a widely used open-source database, has completed a rewrite in Rust and is now passing all regression tests, signaling a major software milestone.

Implications of Rust Rewrite for Postgres Users

This development is significant because it could lead to a more secure and stable version of Postgres, with fewer memory-related bugs and vulnerabilities. Rust’s safety features may reduce the risk of crashes and security exploits, which are critical concerns for database systems handling sensitive data. Additionally, the rewrite could influence future development practices within the open-source database community, encouraging more projects to adopt Rust for core components, potentially leading to overall improvements in software quality and maintainability.
Rust Web Backends in Action : Design, Build, and Deploy Fast and Safe Server Applications

Rust Web Backends in Action : Design, Build, and Deploy Fast and Safe Server Applications

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background on Postgres and the Rust Reimplementation

Postgres, officially known as PostgreSQL, has been a leading open-source relational database since its inception in the 1980s. It is widely used in enterprise, web, and cloud applications for its robustness and extensibility. Over the years, the codebase has primarily been written in C, which, while powerful, is prone to memory safety issues.

In recent years, the Postgres community has explored rewriting parts of the system in modern programming languages like Rust to improve security and code quality. The effort gained momentum after several security vulnerabilities and bugs highlighted the limitations of C in large, complex systems. The recent milestone reflects this ongoing initiative, with the entire core engine now ported to Rust.

Prior to this, the project had tested smaller components and modules in Rust, but the recent achievement confirms that the full rewrite can meet the same functional standards as the original system, passing all regression tests.

“Passing 100% of the regression tests with a Rust implementation demonstrates that a complete rewrite is feasible without sacrificing stability.”

— Michael Paquier, Postgres Developer

SUPABASE COMPLETE: BUILD REAL-TIME SAAS WITH POSTGRES & NEXT.JS: Production Auth, Storage, Vector Search, Serverless APIs – Scale Secure Backends Without Complexity

SUPABASE COMPLETE: BUILD REAL-TIME SAAS WITH POSTGRES & NEXT.JS: Production Auth, Storage, Vector Search, Serverless APIs – Scale Secure Backends Without Complexity

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Remaining Challenges and Unknowns in the Rust Transition

It is not yet clear how the Rust-based version will perform in large-scale production environments or how quickly it will be adopted by the broader community. Compatibility with existing extensions, tools, and workflows remains an area for further testing. Additionally, the timeline for a full public release and the impact on existing users are still to be determined.

Amazon

relational database performance monitor

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Steps Toward Full Deployment and Community Adoption

The Postgres team plans to conduct extensive real-world testing and gather feedback from early adopters. They aim to stabilize the Rust implementation, address any remaining bugs, and prepare for a formal release. Community engagement and documentation updates will be critical to facilitate adoption. The project’s roadmap indicates a phased rollout over the coming months, with the goal of integrating the Rust rewrite into mainstream Postgres releases.

Amazon

Rust programming language development 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 memory safety guarantees, which can reduce bugs and security vulnerabilities. It also facilitates more reliable and maintainable code, potentially leading to better performance and stability.

Will the Rust version be compatible with existing Postgres databases?

The current focus is on ensuring functional equivalence, with full compatibility expected once the Rust version passes all testing phases. Migration guides and tools will likely be provided for users when ready.

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

The team has not announced an official release date but plans to proceed with extensive testing and community feedback before a full public release, likely within the next several months.

Are there any risks associated with the rewrite?

As with any major software rewrite, risks include unforeseen bugs, performance issues, or compatibility challenges. Ongoing testing aims to mitigate these risks before deployment.

Source: hn

FLEA & TICK SEAS

Flea & tick season Picks

As an affiliate, we earn on qualifying purchases.

You May Also Like

Qualcomm Surges In Global Coverage

Qualcomm’s media mentions have increased significantly, with 31 mentions in recent coverage, indicating rising global attention on the company.

“If Single-home Owners Are Made To Move In Unconditionally, Where Should Tenants Go” “A 21St-century Goryeojang”···Seoul City Real Estate Forum Turns Into A ‘Government-bashing Ven

As Seoul considers mandating single-home owners to move in unconditionally, concerns rise over tenant displacement and housing availability.

Show HN: DOM-docx – HTML To Native, Editable Word Docs (MIT)

A new project, DOM-docx, offers open-source HTML to native, editable Word documents, enhancing document automation and editing workflows.

Hills Realty Surges In Global Coverage

Hills Realty has experienced a surge in international coverage, with 19 mentions in recent media monitoring, highlighting increased global interest.