---
title: "TimescaleDB to ClickHouse replication: Use cases, features, and how we built it"
description: "ClickPipes' Postgres CDC connector, built on PeerDB, now replicates TimescaleDB hypertables into ClickHouse for one-time migrations, staged migrations, or running both databases side by side."
url: "https://swe.quest/articles/timescaledb-to-clickhouse-replication-use-cases-features-and-how-we-built-it-be36fccc04b0f111"
canonical: "https://clickhouse.com/blog/timescale-to-clickhouse-clickpipe-cdc"
source: "ClickHouse"
published: "2025-09-09"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 4
tags: ["postgres","replication","event-driven","analytics"]
---

# TimescaleDB to ClickHouse replication: Use cases, features, and how we built it

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2025-09-09, 4 min read, Announcement. Original: [https://clickhouse.com/blog/timescale-to-clickhouse-clickpipe-cdc](https://clickhouse.com/blog/timescale-to-clickhouse-clickpipe-cdc)

## Summary

ClickPipes' Postgres CDC connector, built on PeerDB, now replicates TimescaleDB hypertables into ClickHouse for one-time migrations, staged migrations, or running both databases side by side. Hypertables do not support publish\_via\_partition\_root, so the connector looks up each chunk's parent hypertable itself. It captures new chunks by adding the \_timescaledb\_internal schema to the Postgres publication. Compressed hypertables reject ctid-based parallel snapshotting, so the connector detects this case and falls back to a single-threaded load that uses cursors and Avro+Zstd.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Replication](https://swe.quest/tags/replication.md) (Distributed systems)
- [Event-driven architecture](https://swe.quest/tags/event-driven.md) (Backend & APIs)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)

## Prerequisites

- Postgres logical replication ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- change data capture
- table partitioning

## Keywords

TimescaleDB, ClickHouse, ClickPipes, PeerDB, hypertables, Hypercore

## Related posts

- [Postgres CDC in ClickHouse, A year in review](https://swe.quest/articles/postgres-cdc-in-clickhouse-a-year-in-review-6b9d350bcade98d4.md): ClickHouse · 2025-12-03 · Medium · 13 min read · PostgreSQL, Event-driven architecture, Data pipelines, Analytics & OLAP, Replication
  A year after PeerDB's acquisition, Postgres CDC into ClickHouse via ClickPipes has grown to 400+ companies replicating over 200 TB per month, driven by real-time customer-facing analytics and data warehousing workloads.
- [PostgreSQL + ClickHouse as the Open Source unified data stack](https://swe.quest/articles/postgresql-clickhouse-as-the-open-source-unified-data-stack-2760f19ba52907df.md): ClickHouse · 2026-01-27 · Easy · 5 min read · PostgreSQL, Analytics & OLAP, Event-driven architecture, Replication
  An open source stack pairs PostgreSQL as the transactional system of record with ClickHouse for analytics, connected by PeerDB for change data capture and the pg\_clickhouse extension, which transparently offloads analytical queries from Postgres to ClickHouse.
- [Change Data Capture (CDC) with PostgreSQL and ClickHouse - Part 2](https://swe.quest/articles/change-data-capture-cdc-with-postgresql-and-clickhouse-part-2-2123f803752f2e9d.md): ClickHouse · 2023-06-15 · Medium · 22 min read · Event-driven architecture, PostgreSQL, Analytics & OLAP, Data pipelines, Replication
  A Postgres-to-ClickHouse CDC pipeline is built with Debezium, Kafka Connect and a ClickHouse materialized view, keeping a ReplacingMergeTree table in sync with the 28M-row UK property price dataset under a mix of inserts, updates and deletes.
- [Postgres Meets Analytics: CDC From Neon to ClickHouse Via PeerDB](https://swe.quest/articles/postgres-meets-analytics-cdc-from-neon-to-clickhouse-via-peerdb-669fe8e963909dd5.md): Neon · 2024-10-02 · Medium · 5 min read · PostgreSQL, Event-driven architecture, Analytics & OLAP, Replication, Data pipelines
  Neon serverless Postgres can serve as the transactional system of record while ClickHouse handles real-time analytics, with PeerDB streaming changes between them via Postgres logical replication.
- [Streamkap: An out-of-the-box CDC solution for ClickHouse](https://swe.quest/articles/streamkap-an-out-of-the-box-cdc-solution-for-clickhouse-fb75535a3b94ad24.md): ClickHouse · 2024-02-22 · Medium · 14 min read · Event-driven architecture, Analytics & OLAP, Data pipelines, Schema migrations
  Streamkap's ClickHouse connector streams change data capture from PostgreSQL, MySQL, SQL Server, Oracle and MongoDB into ClickHouse using Kafka, Debezium and Flink.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
