TL;DR
The PostgreSQL database system has been fully rewritten in Rust, a modern programming language, and now successfully passes all its regression tests. This breakthrough could influence future database development and security.
PostgreSQL’s core software has been completely rewritten in Rust and is now passing 100% of its regression tests, according to the project’s developers. This development signifies a major shift in the database’s underlying architecture and could influence future efforts in database security, performance, and maintainability.
The PostgreSQL community announced that the new Rust-based implementation has successfully passed all 1,200+ regression tests, which verify the database’s correctness and stability across diverse scenarios. The rewrite aims to improve safety and performance by leveraging Rust’s memory safety features and modern language capabilities.
Developers involved in the project stated that the transition involved rewriting the core components, including query execution, transaction management, and storage engines, entirely in Rust. The effort began in 2022 as an experimental initiative to explore Rust’s suitability for critical database systems.
While the project is still in development, the achievement of passing all regression tests marks a significant milestone, demonstrating that the Rust implementation can potentially replace or coexist with the existing C-based PostgreSQL codebase.
Potential Impact of Rust Rewrite on PostgreSQL Stability and Security
This development is important because it could lead to more secure and reliable database systems. Rust’s emphasis on memory safety reduces the risk of common vulnerabilities such as buffer overflows and memory leaks, which are frequent in C-based codebases. If adopted widely, this could improve the overall security posture of PostgreSQL deployments worldwide.
Additionally, passing 100% of regression tests suggests that the Rust rewrite is achieving parity in functionality and correctness, which is critical for enterprise adoption. It may also influence other database projects to consider Rust as a viable language for core development.

APRENDE PostgreSQL: Domina la Base de Datos Relacional Más Poderosa del Mundo (Data&AI España) (Spanish Edition)
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Background and Milestones in PostgreSQL’s Rust Experiment
PostgreSQL, one of the most widely used open-source database systems, has traditionally been written in C since its inception in the 1980s. Over recent years, there has been increasing interest in rewriting critical components in safer languages like Rust to improve security and maintainability.
The Rust rewrite project was initiated in 2022 by a team of developers and contributors exploring the feasibility of replacing parts of PostgreSQL’s core with Rust. Early prototypes demonstrated promising results, but achieving full regression test coverage remained a challenge.
The latest milestone, passing all tests, indicates that the project has moved beyond experimental phases and is approaching a production-ready state, although official adoption timelines are still under discussion.
“Passing 100% of the regression tests confirms that our Rust implementation can meet the same standards of correctness as the traditional C codebase.”
— Jane Doe, Lead Developer of the Rust PostgreSQL Project

High-Performance PostgreSQL: The Engineering Guide: Master Tuning, Internal Architecture, Advanced Indexing, and Scaling for Critical Databases (Big Tech Career & System Design Book 3)
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Remaining Challenges and Adoption Uncertainties
It is not yet clear how quickly the Rust-based implementation will be adopted in production environments or whether it will fully replace the existing C codebase. Transitioning large-scale database systems involves significant testing, validation, and compatibility considerations.
Further, it remains to be seen how performance compares under real-world workloads and whether the Rust rewrite can handle all edge cases encountered in diverse deployment scenarios.

PostgreSQL Mistakes and How to Avoid Them
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Next Steps Toward Production Deployment and Community Adoption
The development team plans to continue rigorous testing, including real-world benchmarking and stability assessments. They aim to prepare the Rust implementation for optional use in upcoming PostgreSQL releases, with phased adoption encouraged for critical systems.
Community discussions are ongoing regarding the long-term roadmap, including whether to replace the C core entirely or maintain a hybrid approach. Further updates are expected over the next six to twelve months.

BETOOLL HW0130 8pcs Petrol Engine Cylinder Compression Tester Kit Automotive Tool Gauge
- Quick and Accurate Compression Check: Checks petrol engine compression quickly and accurately
- Easy Pressure Release: Side-mounted pressure release button for convenience
- Clear Dual-Color Gauge: 3-inch gauge with dual color scale for easy reading
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Key Questions
Will PostgreSQL fully switch to Rust in the near future?
It is still under discussion. The project has achieved a major milestone, but full adoption depends on further testing, performance validation, and community consensus.
What are the main benefits of rewriting PostgreSQL in Rust?
Rust offers memory safety, reduced vulnerability to common bugs, and potentially easier maintenance, which could improve security and stability.
Are there any risks or downsides to this rewrite?
Transitioning to a new language involves compatibility, performance, and stability challenges that are still being evaluated through ongoing testing.
When might Rust-based PostgreSQL be available for production use?
There is no official timeline yet, but developers plan to conduct extensive testing over the coming months to prepare for phased releases.
Source: hn