Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Cockroach Labs 7 min read Case study mediumAdept

CockroachDB for Windows users

CockroachDB now ships native Windows binaries (Windows 8+, since v1.0-rc.1), replacing a fragile Docker-based setup that silently blocked many Windows users. Porting required building RocksDB under MSYS2/GCC with upstream patches, including one that had left compiler optimizations off. It also meant removing Unix assumptions from the Go code: hardcoded paths like /dev/null, symlinks, and unguarded raw syscalls. Because go build could not drive RocksDB's CMake build or pick compiler flags dynamically, the team switched to GNU Make to build the C dependencies first, giving up go get support in exchange for automated cross-platform builds. Windows binaries are intended for local development only, not production.

Related posts

  • How to use Rust in ClickHouse: avoiding a full rewrite

    ClickHouse mediumAdept

    ClickHouse, a 1.5M-line C++ analytic database, is adopting Rust incrementally rather than rewriting. It started with Corrosion to wire Rust into CMake and a BLAKE3 hash function, then took on a client history-navigation feature, the PRQL query language, and Databricks' delta-kernel-rs for Delta Lake support. The integration problems were mostly practical: hermetic reproducible builds with vendored crates, buggy FFI wrappers caught quickly by existing CI and fuzzing, library panics that crash the server, compiling Rust with sanitizers (now easier with an MSan toolchain), duplicated cross-compilation setup, and transitive dependencies linking system OpenSSL.

  • Copy-on-Write performance and debugging

    Engineering@Microsoft mediumAdept

    Testing Dev Drive with copy-on-write (block clone) linking across large internal Microsoft repos showed build-time reductions up to 43%, with many repos gaining 10% or more. C# repos with deep project-to-project dependencies and builds that copy files into microservice layouts benefited most, while C++-heavy repos and builds ending in long linear dependency chains gained little. Practical tips cover spotting CoW links with fsutil queryExtentsAndRefCounts, allowing ProcMon and Xperf filter drivers on Dev Drive, and using refsutil leak to clean up orphaned references that hit ReFS's 8176-clone-per-block limit. CoW becomes automatic in Windows 11 24H2 and Server 2025; until then, add the CopyOnWrite SDK to MSBuild repos.

  • CockroachDB 26.4: One major upgrade a year with skip-level upgrades, run active-active across two data centers, and encrypt for the post-quantum era

    Cockroach Labs mediumAdept

    CockroachDB 26.4 introduces skip-level upgrades so operators can move from one annual .4 release to the next without stopping at intermediate releases, and adds active-active writes across two data centers via transactional logical data replication. The release also adds post-quantum TLS, passwordless OIDC/PKCE sign-in, workload identity mapped to SQL users, table-level audit logging, and persisted SQL insights and contention views exposed through information_schema. Operationally, it tightens several security defaults, clears persisted statement and transaction statistics on upgrade, and requires upgrading through 26.2 first; self-hosted binaries follow Cloud rollout by about two weeks.

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

    ClickHouse mediumAdept

    WAL-RUS is an open-source Rust rewrite of WAL-G's Postgres backup and WAL archival tooling, built because Go's garbage-collected runtime made virtual memory hard to predict in resource-constrained managed Postgres environments where overcommit is disabled. It uses bounded worker pools, a persistent daemon with long-lived object storage connections, and a low-copy streaming read-compress-upload pipeline, while keeping WAL-G's WALG_ config variables and two-way archive compatibility. In a WAL-heavy benchmark with four workers archiving to S3, WAL-RUS peaked below 1 GB of virtual memory versus nearly 2.8 GB for WAL-G (over 70% less), with comparable throughput and CPU. pgBackRest also had tight memory but built a larger backlog under heavy WAL activity. WAL-RUS adds incremental backups based on Postgres 17 WAL summaries and is slated to become the default for ClickHouse Cloud's managed Postgres.

  • A Year of Rust in ClickHouse

    ClickHouse mediumAdept

    ClickHouse added Rust to its C++ codebase as an option for new components rather than a rewrite, starting with BLAKE3, then skim for clickhouse-client history, PRQL as a switchable query dialect, and Databricks' delta-kernel-rs replacing a sketchy C++ Delta Lake implementation. The integration needed hermetic builds with vendored crates and careful C++/Rust wrappers. Panics had to be kept from crashing a multi-tenant server, and MSan required instrumenting Rust with a pinned nightly toolchain. Further friction came from cross-compilation, static OpenSSL linking, enormous Rust symbol names, library conventions for memory accounting and connection pools that don't compose with ClickHouse's, and missing build caching, while CI fuzzing caught crashes in the Rust libraries just as it does in C libraries.

The quest for software engineering knowledge.

Look:
Layout: