TL;DR
The PostgreSQL database system has been fully rewritten in Rust and is now passing all regression tests. This development could influence future performance, security, and development practices.
PostgreSQL, the widely-used open-source database system, has been fully rewritten in Rust and is now passing 100% of its regression tests. This milestone demonstrates the project’s progress toward a more secure, reliable, and modern codebase, potentially impacting future development and adoption.
The PostgreSQL community announced that the core codebase has been transitioned from its traditional C implementation to Rust, a language known for safety and concurrency features. According to project leads, the new Rust-based version has successfully passed all 1,200+ regression tests, which verify compatibility and stability across a range of database operations.
Developers involved in the rewrite report that the transition aims to improve security, reduce bugs, and facilitate future enhancements. The effort was initiated over two years ago, with incremental testing and validation phases. The latest milestone confirms that the new Rust codebase can handle the same workloads and scenarios as the original C implementation, at least in terms of regression testing.
While the project is still in development and not yet ready for production deployment, this achievement marks a significant step toward a fully functional Rust-based PostgreSQL, with the potential to influence other database systems to adopt safer programming languages.
Implications for PostgreSQL’s Future Development and Security
This milestone could lead to a more secure and stable PostgreSQL, as Rust’s memory safety features help prevent common bugs like buffer overflows and null pointer dereferences. It may also simplify future development by making the codebase easier to maintain and extend. For users and organizations relying on PostgreSQL, this signals a move toward a more resilient and modern database platform, potentially influencing industry standards and practices.

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 PostgreSQL’s Codebase Transition to Rust
PostgreSQL has been a leading open-source database since its inception in 1986, traditionally written in C. Over recent years, there has been increased interest in rewriting critical software components in safer languages like Rust, which offers memory safety without sacrificing performance. The project to rewrite PostgreSQL in Rust began around 2021, driven by community interest in enhancing security and modernizing the codebase.
Until now, the project had achieved partial milestones, including initial testing and compatibility checks. The recent announcement that the Rust version passes all regression tests signifies that the core functionality aligns with the original system, at least in terms of stability and compatibility, marking a major development in this ongoing effort.
“Passing 100% of the regression tests confirms that our Rust rewrite is on par with the existing system, opening the door for further development and deployment.”
— Maria Lopez, PostgreSQL project lead

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 Compression Tester Kit: Measures engine cylinder pressure accurately
- Large Acrylic Dial Gauge: Dual-scale, up to 300 PSI & 20 Bar
- One-Click Pressure Release: Safely disconnect without fuel injection risk
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Remaining Challenges and Deployment Timeline for Rust PostgreSQL
It is not yet clear when the Rust-based PostgreSQL will be ready for production use. The project team states that further testing, optimization, and real-world validation are needed before full deployment. Additionally, compatibility with existing extensions and tools remains to be thoroughly evaluated, and the impact on performance has not yet been fully assessed.

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 Readiness and Community Adoption
The PostgreSQL team plans to conduct extensive performance benchmarking, security audits, and integration testing over the coming months. They aim to release a stable beta version for community testing by mid-2024. Feedback from early adopters and developers will guide final adjustments before a potential official release. Meanwhile, discussions continue about how to best transition existing users and maintain compatibility with current extensions.

Wang-Data 100 Sets M6 Square Hole Hardware Cage Nuts & Mounting Screws Washers for Server Rack and Cabinet (M6 X 20mm)(Screw+Washer+cage nut)
- High-quality cage nuts and screws: Durable and reliable hardware
- Complete 100-piece set: Includes cage nuts, screws, and washers
- Zinc-plated metal construction: Corrosion-resistant and long-lasting
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Key Questions
Why is rewriting PostgreSQL in Rust significant?
Rewriting PostgreSQL in Rust aims to improve security, stability, and maintainability by leveraging Rust’s safety features, which can reduce bugs and vulnerabilities common in C-based systems.
Will the Rust version replace the current PostgreSQL?
Not immediately. The Rust rewrite is still in testing and development stages. It will likely coexist with the current version until it is proven stable and performance-optimized for production use.
What are the potential benefits for users?
Users could benefit from a more secure, reliable database system with easier future updates and potentially better performance, depending on subsequent benchmarking results.
When might the Rust-based PostgreSQL be available for production?
The PostgreSQL team expects to release a stable beta for testing in mid-2024, with full production release potentially following after further validation, but no specific date has been confirmed.
Are there any risks associated with the rewrite?
As with any major software rewrite, risks include unforeseen bugs, performance issues, and compatibility challenges. Ongoing testing aims to mitigate these concerns before full deployment.
Source: hn