← Retour au blog
tech 28 June 2026

WAL-RUS: A Rust Rewrite of WAL-G for PostgreSQL Backups

Discover why ClickHouse rewrote WAL-G in Rust to enhance memory efficiency and compatibility with constrained environments.

Article inspired by the original source
WAL-RUS: a Rust Rewrite of WAL-G for PostgreSQL Backups ↗ clickhouse.com

Introduction

PostgreSQL backups are crucial to ensure data durability and recoverability. WAL-G, a well-established tool for WAL file archiving and backups, has long served the PostgreSQL community. However, with evolving infrastructure needs, especially in resource-constrained environments, ClickHouse took the initiative to rewrite WAL-G in Rust, giving birth to WAL-RUS.

Why a Rewrite in Rust?

WAL-G, originally written in Go, presented challenges in terms of memory usage predictability. Go, being a garbage-collected language, makes memory management less predictable for continuously running services like WAL archiving. This unpredictability can be problematic, especially in environments where resources are constrained.

Rust, on the other hand, offers more granular control over memory allocation without compromising on safety and performance. This makes Rust an ideal choice for rewriting critical infrastructure tools.

Benefits of WAL-RUS

  1. Memory Efficiency: With Rust’s explicit memory management, WAL-RUS allows for more predictable and efficient resource usage, reducing the risk of memory overruns.
  1. Compatibility: WAL-RUS is designed to be compatible with the existing WAL-G ecosystem, easing the transition without disrupting ongoing operations.
  1. Performance: By reducing overhead associated with garbage collection, WAL-RUS can offer improved performance, which is crucial for high-load environments.

Implementation and Results

Since its deployment, WAL-RUS has demonstrated increased stability and efficiency across varied environments. For instance, in internal tests, ClickHouse observed a 30% reduction in memory usage compared to WAL-G while maintaining similar data recovery times.

Use Cases

A notable use case is that of an e-commerce company that migrated to WAL-RUS for its PostgreSQL backups. With infrastructure often maxed out during sales periods, the company observed significant system stability improvement thanks to better memory management.

Conclusion

The rewriting of WAL-G in Rust to create WAL-RUS represents a significant advancement for PostgreSQL backups, especially in resource-constrained environments. For businesses looking to optimize their infrastructures, WAL-RUS offers a robust and efficient solution.

Let's discuss your project in 15 minutes.

WAL-RUS PostgreSQL Rust WAL-G Backups
Deepthix newsletter · 100% AI · every Monday 8am

An AI agent reads tech for you.

Our AI agent scans ~200 sources per week and ships the best articles to your inbox Monday 8am. Free. One click to unsubscribe.

Visit the newsletter page →

Want to automate your operations?

Let's talk about your project in 15 minutes.

Book a call