---
title: "Why we rewrote WAL-G for Postgres backups in Rust: Meet WAL-RUS"
description: "ClickHouse Cloud built WAL-RUS, an open-source Rust implementation of PostgreSQL backup and WAL archival tooling, after encountering difficulty predicting WAL-G’s memory usage in resource-constrained environments. The project preserves WAL-G’s core functionality and compatibility while using bounded worker pools, controlled concurrency, persistent object-storage connections, and a streaming pipeline that limits buffering and data copies. It uses the same WALG_ configuration variables, and WAL-G and WAL-RUS can read each other’s archives. In a sustained WAL-heavy benchmark with four archival workers, WAL-RUS stayed below 1 GB of peak virtual memory versus nearly 2.8 GB for WAL-G, while both maintained minimal backlog and comparable CPU usage. The authors plan to make WAL-RUS the default backup and archival mechanism for ClickHouse Cloud’s managed Postgres offering and are working to upstream its Postgres 17 wal summaries support to WAL-G."
---

# Why we rewrote WAL-G for Postgres backups in Rust: Meet WAL-RUS

[Clickhouse](https://yomu.fyi/company/clickhouse) · Jun 25, 2026

**Type:** Problem & solution

## Summary

ClickHouse Cloud built WAL-RUS, an open-source Rust implementation of PostgreSQL backup and WAL archival tooling, after encountering difficulty predicting WAL-G’s memory usage in resource-constrained environments. The project preserves WAL-G’s core functionality and compatibility while using bounded worker pools, controlled concurrency, persistent object-storage connections, and a streaming pipeline that limits buffering and data copies. It uses the same WALG\_ configuration variables, and WAL-G and WAL-RUS can read each other’s archives. In a sustained WAL-heavy benchmark with four archival workers, WAL-RUS stayed below 1 GB of peak virtual memory versus nearly 2.8 GB for WAL-G, while both maintained minimal backlog and comparable CPU usage. The authors plan to make WAL-RUS the default backup and archival mechanism for ClickHouse Cloud’s managed Postgres offering and are working to upstream its Postgres 17 wal summaries support to WAL-G.

## Context

As ClickHouse Cloud scaled Postgres into increasingly resource-constrained environments, WAL-G’s garbage-collected Go runtime made resident and virtual memory usage difficult to predict. The resulting uncertainty encouraged over-provisioning backup infrastructure, reducing the memory confidently available to Postgres and complicating capacity planning, particularly with overcommit disabled.

## Approach / What changed

WAL-RUS reimplements Postgres backup and WAL archival tooling in Rust while preserving WAL-G compatibility. It uses bounded worker pools, controlled concurrency, persistent object-storage connections for daemonized archival, and a streaming pipeline that minimizes buffering and data copies. It reuses WALG\_ configuration variables, interoperates with WAL-G archives, and supports Postgres 17 wal summaries for incremental backups.

## Takeaways

- In the benchmark, WAL-RUS remained below 1 GB of peak virtual memory, while WAL-G reached nearly 2.8 GB, reducing peak virtual memory by more than 70%.
- WAL-RUS and WAL-G both maintained minimal archival backlog under the sustained WAL-heavy workload; pgBackRest accumulated a larger backlog during periods of intense WAL activity.
- WAL-G can read archives generated by WAL-RUS and WAL-RUS can read WAL-G archives, while both tools use the same WALG\_ configuration variables.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [Open Source](https://yomu.fyi/topic/open-source), [Performance](https://yomu.fyi/topic/performance), [Postgres](https://yomu.fyi/topic/postgres), [Rust](https://yomu.fyi/topic/rust)

- Source: [Clickhouse](https://clickhouse.com/blog/walrus-postgres-backups-in-rust)
- Source URL: https://clickhouse.com/blog/walrus-postgres-backups-in-rust
- Ingested by Yomu: 2026-08-29T01:36:40.896Z

[Read original post](https://clickhouse.com/blog/walrus-postgres-backups-in-rust)
