ClickHouse Expands CDC Reach to TimescaleDB Hypertables
Share this article
As organizations grapple with scaling analytical workloads on time-series databases, ClickHouse has extended its Change Data Capture (CDC) capabilities to TimescaleDB. The Postgres CDC connector in ClickPipes—ClickHouse Cloud's data ingestion service—now supports continuous replication from TimescaleDB hypertables to ClickHouse Cloud, addressing customer demands for migrating or augmenting time-series analytics pipelines.
Scaling Beyond Time-Series Limits
TimescaleDB users often hit performance ceilings as data volume grows. "Significant tuning and deep database expertise become necessary," the ClickHouse team notes, prompting migration to ClickHouse's columnar engine for faster analytical queries. ClickPipes facilitates this via:
- Online Migrations: Full one-time transfers of terabyte-scale datasets
- Iterative Migration: Gradual workload shifts with sub-second replication lag
- Coexistence: Real-time sync enabling TimescaleDB for transactions + ClickHouse for analytics
\"The Postgres CDC connector made it easy to transition without redesigning our pipeline. It significantly improved dashboard performance and enabled faster data exploration.\" — Team @ Kindly.ai
Engineering Hypertable Handling
TimescaleDB's hypertables—partitioned into child "chunks"—posed unique replication hurdles:
- Chunk Routing: Unlike standard Postgres partitions, hypertables lack native
publish_via_partition_rootsupport. ClickPipes manually maps changes to parent tables. - Dynamic Chunk Capture: Automatically including new
_timescaledb_internalchunks in publications ensures hands-off operation. - Compression Workarounds: Parallel snapshotting fails on compressed hypertables due to CTID limitations. ClickPipes detects compression and switches to single-threaded Avro/Zstd-optimized paths.
Diagram: TimescaleDB chunk replication flow to ClickHouse
Enterprise-Grade Features
Beyond schema-change support and hypertable compatibility, ClickPipes delivers operational visibility:
- Throughput and latency metrics per table
- Replication slot monitoring
- Alerting for failures or slot growth via Slack/email
The integration exemplifies how CDC bridges specialized databases—letting teams leverage TimescaleDB's time-series strengths while unlocking ClickHouse's analytical firepower for ever-growing datasets.
Source: ClickHouse Blog