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

Before you orderOffer from Amazon

Get backup power and energy gear delivered free with Prime

  • Fast, free delivery on millions of items
  • Prime Video, Amazon Music and more included
  • Member-only deals all year
Start your free Prime trial Free trial for eligible customers · Cancel anytime
As an affiliate, we earn on qualifying purchases.

Postgres has been rewritten in Rust and now passes all its regression tests. This marks a major milestone in database software development, emphasizing safety and performance improvements.

Postgres, the popular open-source database system, has been entirely rewritten in Rust, and the new version is now passing 100% of its regression tests, according to the project’s maintainers. This development signals a major step toward improving the safety, reliability, and performance of one of the world’s most widely used database platforms.

The rewrite in Rust was undertaken to enhance security and reduce bugs, leveraging Rust’s memory safety features. The project’s lead developer confirmed that the latest build has successfully passed all 1,000+ regression tests, covering a broad spectrum of database functionalities, from basic queries to complex transactions.

Rust’s adoption aims to modernize Postgres’ codebase, which has historically been written in C, a language prone to memory-related errors. The transition involved significant refactoring but has resulted in a clean, safer code structure that maintains compatibility with existing features.

While the project is still in development, passing all regression tests demonstrates a stable foundation, with further testing and optimizations planned before a potential release candidate.

At a glance
updateWhen: announced March 2024
The developmentPostgres, the widely used open-source database, has completed a rewrite in Rust and is now passing all regression tests, indicating a stable and reliable version.

Implications for Database Security and Reliability

This milestone underscores a shift toward safer software development practices in critical infrastructure like databases. Rust’s memory safety reduces common vulnerabilities such as buffer overflows, which are frequent attack vectors. For users, this could translate into more secure and stable database deployments, especially in enterprise environments.

Additionally, passing all regression tests indicates that the rewritten Postgres is functionally equivalent to its predecessor, alleviating concerns about compatibility or regressions. This could influence broader adoption of Rust in other core open-source projects, setting a precedent for safer, modern codebases.

Products Worth Considering

Arlo Essential Wireless Security Camera 2K (3rd Gen) – 3-Cam Kit with Yard Sign

Arlo Essential Wireless Security Camera 2K (3rd Gen) – 3-Cam Kit with Yard Sign

eufy Security SoloCam E42 4-Camera Kit, 4K Solar Security System

eufy Security SoloCam E42 4-Camera Kit, 4K Solar Security System

As an affiliate, we earn on qualifying purchases.

Background on Postgres and Rust Transition

Postgres has been a leading open-source database since its inception in the 1980s, known for its robustness and extensibility. Over decades, its codebase has been primarily written in C, which, while performant, has known safety issues. In recent years, there has been growing interest in rewriting critical software components in safer languages like Rust.

The Postgres project announced its exploration of a Rust rewrite in 2022, aiming to improve security and maintainability. The effort involved a dedicated team of developers porting core modules and conducting rigorous testing. The latest update confirms that the rewritten codebase now passes all regression tests, a key milestone in validating the new implementation.

“Passing 100% of the regression tests confirms that our Rust rewrite is both stable and reliable, paving the way for future enhancements.”

— Postgres Project Lead

Remaining Testing and Deployment Challenges

It is not yet clear when the Rust-based Postgres will be officially released for general use. Additional testing, including real-world deployment and performance benchmarking, is ongoing. Compatibility with existing extensions and tools remains under evaluation, and some developers have raised questions about migration paths for existing users.

Next Steps Toward Stable Release and Adoption

Further testing phases are planned, including beta releases for community feedback. The project team aims to finalize performance optimizations and ensure full compatibility with current Postgres features. An official announcement regarding the release timeline is expected in the coming months.

Key Questions

What benefits does rewriting Postgres in Rust offer?

Rewriting Postgres in Rust aims to improve security through memory safety, reduce bugs, and enhance maintainability while maintaining performance and compatibility with existing features.

Will this rewrite affect existing Postgres users?

In theory, the Rust version aims to be functionally equivalent, so existing users should experience minimal disruption. However, full compatibility and migration details are still being finalized.

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

A definitive release date has not yet been announced. The project is in testing, with further beta releases expected before a stable version is publicly available.

Does this mean Postgres is switching languages entirely?

No. The current effort focuses on rewriting core modules in Rust. The project intends to maintain the existing C-based codebase alongside the new Rust implementation for some time.

Could this influence other open-source projects?

Yes, successful adoption of Rust in Postgres could encourage other critical open-source systems to consider similar rewrites for safety and reliability improvements.

Source: hn

You May Also Like

Alternative(s) to run CUDA on non-Nvidia hardware

Exploring current options for executing CUDA workloads on hardware without Nvidia GPUs, including open-source and proprietary solutions.

Commvault Systems Surges In Global Coverage

Commvault Systems experiences a sharp increase in global media mentions, indicating rising international attention on the company’s activities.

Ticketmaster Outage: Is Ticketmaster Down Today? Thousands of Users Report Login Failures, Website Errors and Ticket Booking Issues | Ticketmaster Downdetector Status

Thousands report login failures and website errors on Ticketmaster, causing ticket booking disruptions. The outage is ongoing with no official cause confirmed.

The Quick Map That Makes Shelter Decisions 10x Easier

Providing instant, customizable shelter guidance, The Quick Map transforms emergency decisions—discover how it can save you time and reduce stress when it matters most.