ClickHouse Migration

ClickHouse Migration Services: Postgres, Elasticsearch and Warehouses

Last reviewed by Tyler Eastridge

AceMQ plans and runs migrations of analytics workloads to ClickHouse from PostgreSQL, Elasticsearch, Druid and cloud warehouses. We start with the queries you need to keep fast, design the tables around them, load and sync the data with the route that suits your source, check the results against the old system, and cut over with the old platform still running. A lift-and-shift of the source schema is where ClickHouse migrations go wrong, so that is where we begin.

source families scoped: PostgreSQL, Elasticsearch, Druid, cloud warehouses and files
5
newest ClickHouse LTS line on 4 Nov 2026, supported for a year after release
26.8
quote reply once we have the source, data volume and query shapes
1 hour

Is This You?

You probably need this if…

  1. 01

    Analytical queries on PostgreSQL are slowing the application database, or the reporting replica cannot keep up

  2. 02

    An Elasticsearch cluster built for logs or events costs more each quarter, and most of the queries are filters and aggregations

  3. 03

    A warehouse bill is driven by a few high-volume event tables that need fast, repeated, interactive queries

  4. 04

    A proof of concept loaded a copy of the source schema into ClickHouse and the dashboards were not fast

  5. 05

    Kafka already carries the events, and the question is what sits at the end of the topic

  6. 06

    You are choosing between self-managed ClickHouse and ClickHouse Cloud and want the operating differences written down

Outcomes

Where you are now, and where you end up

Concrete state changes, not deliverable counts. This is what actually differs about your ClickHouse estate when the engagement closes.

  1. Before

    The case for ClickHouse is a benchmark on someone else's data.

    After

    A short list of your own queries, with the ones that must stay fast, the access patterns behind them and a table design for each.

  2. Before

    The proof of concept copied the source tables column for column.

    After

    Tables designed around the sorting key, data types and aggregation your queries need, loaded with real data and timed.

  3. Before

    Validation is a row count and a dashboard that looks about right.

    After

    Counts, key-range aggregates and the results of your real queries compared between source and ClickHouse, with a stated tolerance for approximate functions.

  4. Before

    The cutover is a switch with no way back.

    After

    The old platform kept running and fed in parallel until the numbers match, then a cutover with a defined rollback and a retirement date for the old system.

Recognise your estate here? Get a quote for ClickHouse migration from a senior engineer.

Contact Us

Scope

What's covered

  • 01

    Workload and Query Inventory

    The queries, dashboards and APIs that read the source, how often, over what time range and with what latency expectation. This sets the table design more than the source schema does.

  • 02

    Table and Sorting-Key Design

    MergeTree family choice, ORDER BY, data types, low-cardinality and nullable columns, partitioning only where it earns its place, and how late updates and deletes are modelled.

  • 03

    Load and Change Sync

    A bulk load, or an initial snapshot followed by continuous change capture: ClickPipes or PeerDB from PostgreSQL, a Kafka topic from Debezium or an existing pipeline, or files through object storage.

  • 04

    Validation

    Counts and aggregates over key ranges, a replay of your top queries on both systems, and a written rule for where results differ by design, such as approximate distinct counts.

  • 05

    Cutover and Rollback

    Dashboards and services moved one at a time while the source keeps feeding, a rollback at each step, and a date on which the old system stops.

  • 06

    Landing Platform and Support

    Self-managed or ClickHouse Cloud, shard and replica layout, ClickHouse Keeper, backups, monitoring, version policy, and optional 24/7 support from the team that did the move.

Want a senior ClickHouse engineer to scope this with you? Get a quote or send us a message.

Contact Us

The Engagement

How it actually runs

Every phase has a defined duration and a concrete artifact handed over at the end of it. You always know what stage you're in and what you've received.

  1. Phase 1First step

    Assessment

    We read the source, its query load and its growth, and decide which workloads belong in ClickHouse at all. Delivery is remote and guided by your engineers, with access scoped to what each phase needs. The output may be a plan to move one workload, or a recommendation to stay put.

    You receive

    • Query and workload inventory
    • Target table designs for the first workloads
    • Route, platform choice and risk register
  2. Phase 2One workload

    Design and Proof

    One representative workload is modelled, loaded and queried against real data. The sorting key, types and aggregation are adjusted until the queries that matter behave, before the rest of the estate is committed.

    You receive

    • Tables and loading scripts in version control
    • Timings for the top queries
    • Revised plan and order for the rest
  3. Phase 3Per source

    Sync and Parallel Run

    Data is loaded and kept in sync while the old platform stays in service. Validation runs continuously, and consumers are repointed one at a time against agreed checks.

    You receive

    • Load and sync runbook per source
    • Validation suite and a defect log
    • Cutover order for dashboards and services
  4. Phase 4Per consumer

    Cutover and Handover

    Each consumer moves with a rollback decision written in advance. We stay engaged until ClickHouse is stable under real load, then hand over runbooks, dashboards and alerts, or move the platform onto support.

    You receive

    • Executed cutovers with a decision log
    • Retirement plan for the old system
    • Handover pack: runbooks, dashboards and alerts

Where the data comes from decides the route

ClickHouse's own migration guides cover PostgreSQL, BigQuery, Snowflake, Elasticsearch and Redshift, with remoteSecure, backup and restore, clickhouse-local, ETL tools and object storage as other routes. The tools move rows. What differs by source is what has to be redesigned.

Migration routes to ClickHouse by source
SourceWays to move the dataWhere the effort concentrates
PostgreSQLReal-time CDC through ClickPipes (ClickHouse Cloud) or PeerDB (self-managed ClickHouse), or a bulk load with periodic updates, as ClickHouse's migration guide documents. Debezium into Kafka when a stream already exists.Replacing row-level updates with a table design that handles them, keeping a pooler out of the CDC path, wide tables built from joins, and deciding which tables belong in ClickHouse at all.
ElasticsearchExport through object storage or an ETL tool, or a re-ingest from the Kafka topic that fed the cluster. Sources of truth are often in the topic or a database, not the index.Mapping fields to typed columns, nested and array fields, time-series retention, and the queries that use relevance scoring or fuzzy matching, which have no direct equivalent.
Apache DruidRe-ingest from the original stream or files. If the raw events are gone, extracting from Druid with queries is scoped as its own step.Rollup and pre-aggregation moved into the table design or materialized views, and the query language change from Druid SQL or native JSON.
BigQuery, Snowflake, RedshiftFollow ClickHouse's migration guide for each warehouse. Object storage or an ETL tool is the usual transport.SQL dialect differences, semi-structured columns, scheduled transformations, and the permission model that sat in the warehouse.
Files and streamsObject storage, clickhouse-local, or a consumer on a Kafka topic.Idempotent loading, schema evolution of the incoming events and what happens to late data.

Why a lift-and-shift schema fails, and what to design instead

ClickHouse stores a table as parts sorted by the ORDER BY key and reads it through a sparse primary index over blocks of 8,192 rows, called granules. The key you choose decides which queries skip data and which scan it. ORDER BY also sets the primary key unless you say otherwise. Copy a relational schema and the key becomes an afterthought, which is how a fast database ends up with slow dashboards.

  • Sorting key — Chosen from the filters your queries use, with the columns you filter by most and cardinality in mind. A long key costs insert speed and memory, per the MergeTree documentation. Adding a new column to both the table and the key is lightweight, and a different key generally means a new table and a reload, so it is decided before the load.
  • Partitioning — Most tables need none. ClickHouse's documentation says partitioning does not speed up queries the way the sorting key does and recommends nothing finer than monthly when it is used. Partitioning by customer or tenant is the usual mistake.
  • Updates and deletes — Source rows change, and ClickHouse prefers appending. CDC pipes to ClickHouse default to ReplacingMergeTree, so reads need FINAL and a filter on the deleted flag, or a design where the question is asked of an aggregate. We pick the model per table, with the query cost in view.
  • Types — Timestamps with sub-second precision, decimals, low-cardinality strings, enums and nullable columns each have a cost or a trap. The type map is written down before data moves, as the validation step compares against it.
  • Joins and wide tables — Large multi-table joins that were cheap in a row store can be expensive in ClickHouse. Denormalizing into a wide table, or precomputing in a materialized view, is a design decision per query, not a default.
  • Approximate functions — ClickHouse offers fast approximate aggregates such as uniq, alongside exact ones such as uniqExact. Where the source returned an exact distinct count, the choice is stated and the validation tolerance with it.

Where the cost sits

Moving the rows takes the least time. The cost is in the table design and in the queries and dashboards that must be rewritten for it. That is why we model and load one workload end to end before committing to a plan for the rest.

Ready to talk ClickHouse? Get a quote or send us a message.

Contact Us

Keeping the data in sync during the move

A one-time bulk load is enough when the source can be frozen for the copy, or when the history is loaded once and only new events arrive afterwards. When the source keeps changing, you need change data capture.

For PostgreSQL, ClickHouse's documentation describes CDC through ClickPipes for ClickHouse Cloud and through PeerDB for self-managed ClickHouse as the most efficient route for most migrations. ClickPipes takes an initial snapshot and then replicates continuously, with a default sync interval of 60 seconds. The source needs logical replication enabled and a replication user. Poolers and proxies such as PgBouncer, RDS Proxy and Supabase Pooler are not supported in the CDC path, so the connection goes to the database host itself. A pipe must be paused to be updated, and only some settings can change after creation, which is why settings are chosen on the rehearsal.

When a Kafka topic already carries the events, ingesting from the topic is usually cleaner than copying from the source database, because the same stream can feed the old and new platforms during the parallel run. The same applies to Debezium topics from a relational source.

Self-managed or ClickHouse Cloud, and which version to land on

ClickHouse deployment choices that change the migration
QuestionSelf-managed ClickHouseClickHouse Cloud
PostgreSQL CDC toolPeerDB, as ClickHouse's migration guide documents for on-prem ClickHouse.ClickPipes, which replicates into ClickHouse Cloud.
Who runs replication, backups and upgrades?You, or a support or managed provider, on your infrastructure or ours.The service, within its own limits. Settings and versions follow the service.
What stays with you either way?Table design, sorting keys, ingestion, queries and cost of reads.The same.
How do you leave?Your data and your files. Nothing to exit.Export to object storage or replicate out. Check the route before committing.

For self-managed estates the target version matters. ClickHouse versions are numbered by year and month, a stable release comes about monthly, the three latest stable releases receive backported fixes, and an LTS is released twice a year and supported for a year. As of 4 November 2026 the LTS lines are 26.3 and 26.8, and the latest release is 26.10. A migration target is chosen on that rule, with the upgrade cadence agreed before go-live rather than after the first release falls out of support.

ClickHouse Cloud plan and pricing questions are answered from the vendor's own pages during the assessment. AceMQ is independent of ClickHouse Inc. and does not resell the service.

Recognise your estate here? Get a quote for ClickHouse migration from a senior engineer.

Contact Us

Who this migration service is not for

  • Transactional workloads — ClickHouse is a columnar analytical database. Moving an OLTP workload to it is the wrong project.
  • Small data on a healthy PostgreSQL — If the analytical queries are modest and the database copes, indexes, partitioning or a read replica may be all you need. We say so after the assessment.
  • Search with relevance ranking — If the Elasticsearch workload depends on scoring, fuzzy matching and highlighting, ClickHouse is not a replacement. A search engine, or a split of the workload, is a better answer.
  • A data copy only — If the schema is simple, the route is documented and your engineers have time, ClickHouse's own migration guides are enough.
  • A fixed price and date before assessment — The workloads and queries decide the effort. We scope after the assessment and a proof on one workload, and quotes come back within 1 hour of getting your source, data volume and query shapes.

Want a senior ClickHouse engineer to scope this with you? Get a quote or send us a message.

Contact Us

Typical engagements

How these engagements run

Typical engagement scenarios: what the work covers and what it delivers. They describe the service, not past results.

1 / 4 case studies

  • Remediation

    ClickHouse Too Many Parts Remediation

    Adtech Measurement Platform

    Resolving ingestion failures where frequent small inserts produced parts faster than background merges could retire them, tripping the parts limit.

    ClickHouseKafkaKubernetesPrometheus
  • Support

    ClickHouse MergeTree and Replication Support

    Cybersecurity Analytics Provider

    Ongoing support for ReplicatedMergeTree clusters covering replication queue stalls, memory limit failures on large queries, and mutation backlogs.

    ClickHouseClickHouse KeeperKubernetesPrometheus
  • Consulting

    ClickHouse Schema and Sort Key Design Consulting

    Industrial IoT Platform Operator

    Redesigning ORDER BY keys, partitioning, codecs, and materialized views so dashboard queries read a small fraction of the data instead of full scans.

    ClickHouseKafkaGrafanaLinux
  • Assessment

    ClickHouse Cluster and Storage Assessment

    Financial Market Data Provider

    Assessment of shard and replica topology, storage tiering, query concurrency limits, and merge behavior ahead of a significant data volume increase.

    ClickHouseClickHouse KeeperS3Prometheus
All use cases

FAQ

Questions about ClickHouse migration

How do you migrate PostgreSQL to ClickHouse without stopping the application?

With change data capture. ClickHouse's migration guide describes ClickPipes for ClickHouse Cloud and PeerDB for self-managed ClickHouse: an initial snapshot, then continuous replication, while PostgreSQL keeps taking writes. The source needs logical replication enabled, and a connection pooler cannot sit in the CDC path. We rehearse the load and the lag before any consumer moves.

Can we move our schema to ClickHouse as it is?

You can copy it, but the result is usually slow. ClickHouse reads data through the ORDER BY key, so the table has to be designed around the queries rather than around the source structure. We model one workload first, load real data and time the queries that matter before committing to the rest.

Can ClickHouse replace our Elasticsearch cluster?

For log and event analytics that are mostly filters and aggregations, often yes. For workloads built on relevance scoring, fuzzy search and highlighting, no. The assessment sorts your queries into those two groups, and may leave part of the workload where it is.

Self-managed ClickHouse or ClickHouse Cloud?

It changes the tooling and who operates the cluster. ClickPipes targets ClickHouse Cloud and PeerDB suits self-managed ClickHouse, according to ClickHouse's guide. Table design and query cost stay with you either way. We lay out the differences for your case, and AceMQ supports self-managed estates under 24/7 support or managed operation.

Who does the work, and what happens after cutover?

AceMQ delivers the migration with partner data platform specialists, working remotely with your engineers and agreeing access phase by phase. Afterwards you can run ClickHouse yourselves, put it under 24/7 ClickHouse support, or have it operated for you on your infrastructure or ours.

Let's talk

Scope Your ClickHouse Migration

Tell us the source (PostgreSQL, Elasticsearch, Druid or a warehouse), the data volume and the queries that must stay fast. We will reply within 1 hour and follow with an assessment plan and a written quote.

Email Us

Get in Touch

Talk to a ClickHouse Expert

Send us a message and we'll follow up within 1 hour — or book a free 30-min consultation directly.

305-204-2607
info@acemq.com
66 W. Flagler St. 9th Floor
Miami, FL 33130

Prefer to talk now? Call us directly or use the consultation tab to find a time that works.

We respond within 1 hour.

Pick a time that works — no pressure, no pitch. Just 30 minutes with an expert.

We respond within 1 hour.