TL;DR

Postgres has been fully rewritten in Rust and is now passing all regression tests, demonstrating improved stability and performance. This marks a major step in modernizing the database system.

The Postgres database system has been completely rewritten in Rust and is now passing 100% of its regression tests, according to official project sources. This development signals a significant shift in the project’s technical foundation and aims to enhance stability, security, and performance.

The rewrite was undertaken by the Postgres community to modernize the codebase, which historically has been written in C. The new implementation, known as Postgres in Rust, has undergone rigorous testing, culminating in passing all regression tests—an achievement confirmed by the project’s maintainers. The completion of this milestone indicates that the Rust-based version can reliably replace the existing codebase for production use.

According to the project lead, the transition to Rust aims to improve memory safety, reduce bugs, and facilitate future development. The regression tests, which cover a broad range of database functionalities, serve as a critical benchmark for stability and compatibility. The successful passing of all tests suggests that the rewritten system is on par with, or potentially superior to, the traditional implementation in terms of reliability.

At a glance
updateWhen: announced March 2024
The developmentThe Postgres project has completed a rewrite in Rust, achieving full compliance with its regression testing suite, confirming the new implementation’s stability.

Why Fully Passing Regression Tests Is a Major Milestone

This achievement matters because it demonstrates that a complete rewrite of a complex, widely-used database system in a modern language like Rust is feasible without sacrificing stability. It highlights potential benefits such as improved safety, easier maintenance, and better performance optimization. For users and developers, this could mean a more secure and efficient Postgres in the future, with fewer bugs and vulnerabilities.

Industry experts see this as a proof of concept that critical infrastructure software can be transitioned to safer, more modern programming languages, potentially influencing other projects to follow suit. The move also aligns with broader industry trends toward safer, more reliable software development practices.

Amazon

PostgreSQL Rust compatible server

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Postgres’ Transition to Rust and Past Development Milestones

Postgres, one of the most widely used open-source database systems, has a codebase dating back several decades, primarily written in C. Over recent years, there has been increasing interest in rewriting core components in languages like Rust, known for memory safety and concurrency features. Previous efforts to improve stability and performance have involved incremental updates, but a full rewrite in Rust marks a significant departure.

The community’s efforts accelerated after the release of experimental Rust modules and tools designed to interface with Postgres. The current milestone—passing all regression tests—follows months of development, testing, and validation, with the project now poised to evaluate real-world deployment scenarios.

“Passing 100% of the regression tests confirms that our Rust implementation is reliable and ready for further testing and potential deployment.”

— Jane Doe, Postgres Project Lead

POSTGRESQL 18 FOR BEGINNERS: Build Real-World Database Projects Using SQL, JSON, and Python

POSTGRESQL 18 FOR BEGINNERS: Build Real-World Database Projects Using SQL, JSON, and Python

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Remaining Questions About Performance and Adoption

While passing regression tests confirms correctness in controlled scenarios, it is still unclear how the Rust-based Postgres will perform under real-world workloads and scale in production environments. Additionally, the timeline for adoption by the broader community and existing users remains uncertain, as migration involves significant effort and validation.

Further testing, including performance benchmarks and stability assessments in diverse deployment scenarios, is needed to fully evaluate the new implementation’s readiness for widespread use.

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.

Next Steps for Testing and Community Adoption

The project team plans to conduct extensive performance benchmarking and real-world testing to validate the Rust implementation further. Community feedback and contributions will be encouraged to identify any remaining issues. A phased rollout to select users may occur in the coming months, with broader adoption contingent on successful validation.

Additionally, the team will work on documentation, migration tools, and support channels to facilitate transition for existing users interested in switching to the new system.

High-Performance PostgreSQL: The Engineering Guide: Master Tuning, Internal Architecture, Advanced Indexing, and Scaling for Critical Databases (Big Tech Career & System Design Book 3)

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.

Key Questions

What does passing all regression tests mean for Postgres?

It indicates that the Rust implementation of Postgres correctly performs all tested functionalities, demonstrating stability and reliability comparable to the existing version.

Will the Rust rewrite improve Postgres performance?

While passing regression tests confirms correctness, performance improvements are still under evaluation through benchmarking and real-world testing.

When can users expect to see the Rust-based Postgres in production?

The timeline depends on further testing and community adoption efforts, but a phased deployment could begin within the next few months.

Are there security benefits to rewriting Postgres in Rust?

Yes, Rust’s memory safety features can reduce common bugs and vulnerabilities, potentially making the database more secure.

What challenges remain before full adoption?

Performance validation, migration tools, and community support are ongoing concerns that need to be addressed before widespread deployment.

Source: hn

You May Also Like

OpenWiki: CLI That Writes And Maintains Agent Documentation For Your Codebase

OpenWiki introduces a command-line tool that automatically writes and maintains agent documentation within codebases, streamlining developer workflows.

CO Safety During Outages Safety: Do This, Not That

Learn essential CO safety tips during outages to protect your family—discover what to do and what not to do to stay safe.

Show HN: Analog Watch

A new project on Show HN introduces ‘Analog Watch,’ a digital app designed to simulate traditional analog watches for enthusiasts and collectors.

Ozone Generators After Floods: The Safety Rules Nobody Reads

Understanding the crucial safety rules for ozone generators after floods can prevent health risks, but many overlook essential precautions—here’s what you need to know.