Skip to content

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

Sources

ClickHouse

2026

ClickHouse

Fencing a Postgres primary that might still be alive

Case study 10 min +100 XP

Before promoting a standby, a managed Postgres control plane must fence the old primary, because promotion and DNS changes alone don't stop writes: async standbys, per-session synchronous_commit overrides, quorum commit with a remaining standby, and canceled commits already in WAL can all let a still-alive primary accept writes.

ClickHouse

Memory safety for Postgres extensions in C/C++

Case study 4 min +40 XP

Postgres's palloc/MemoryContext allocation and setjmp/longjmp-based error handling clash with C++ new/delete, destructors and exceptions: longjmp skips destructors (undefined behavior), exceptions bypass PG_CATCH, and an uncaught exception aborts the process and forces cluster-wide crash recovery.

ClickHouse

Announcing Silk: a silky smooth fiber runtime for ClickHouse

Announcement 11 min +110 XP

Silk is a C++ stackful-fiber runtime for ClickHouse. It pins one scheduler thread per CPU, uses io_uring as its I/O foundation, steals work in order of CPU topology cost (hyperthread sibling, then same socket, then cross-socket), and does zero heap allocation in the steady-state hot path through mmap'd stack pools, stack-resident futures and intrusive containers.

ClickHouse

Introducing multi-stage distributed query execution in ClickHouse Cloud

Deep dive 14 min +140 XP

ClickHouse Cloud adds multi-stage distributed query execution, splitting a query plan into stages connected by exchange operators (Gather, Shuffle, Broadcast, Scatter) so intermediate data can be repartitioned between nodes mid-query.

ClickHouse

pg_stat_ch: a PostgreSQL extension that exports every metric to ClickHouse

Deep dive 16 min +160 XP

pg_stat_ch is an open-source (Apache 2.0) PostgreSQL 16–18 extension that captures every statement execution, including failed queries and DDL, as a fixed-size ~4.6KB event with 45 fields and streams it to ClickHouse for APM-style analysis.

2025

ClickHouse

From OTel to Rotel: Petabyte-scale tracing with 4x greater throughput

Case study 25 min +250 XP

Rotel, a Rust OpenTelemetry collector, sustained 3.7M trace spans/sec (462K per core) on an 8-vCPU gateway writing through Kafka into ClickHouse, versus 1.1M spans/sec (137K per core) for the OTel Collector on the same hardware.

ClickHouse

chDB Kernel Upgrade Journey: Upgrading ClickHouse to v25.8.2.29

Case study 16 min +160 XP

Upgrading chDB's embedded ClickHouse kernel from v25.5 to v25.8.2.29 surfaced allocator conflicts rooted in chDB's dual-library design: a stable-ABI `_chdb.abi3.so` holding the ~120MB engine plus small per-Python-version pybind11 binding libraries.

The quest for software engineering knowledge.

Look:
Layout: