Use case

Offload analytics queries from PostgreSQL to ClickHouse without a rewrite

When dashboards and exports slow your primary PostgreSQL, move the read-heavy analytics to ClickHouse and keep PostgreSQL for transactions. The usual pattern is change capture from PostgreSQL into ClickHouse, so the application keeps one write path. OSStend engineers design that pipeline, choose which tables move and set what stays in PostgreSQL. Both engines are open source: ClickHouse under Apache-2.0 and PostgreSQL under the PostgreSQL licence (ClickHouse licence, PostgreSQL licence, checked 23 Nov 2026). A typical design copies append-heavy tables such as events, orders and audit rows, keeps dimension tables small in ClickHouse as dictionaries or joins, and leaves anything that needs row-level updates in PostgreSQL. The first useful answer is not a tool name but a list of which 5 to 10 queries cause the load.

45 minutes with an engineer: we review your workload and sketch the design.

  • Our cloud
  • SaaS
  • Design
Source
PostgreSQL primary, logical replication
Target
ClickHouse, dedicated cluster
Pipeline
Change capture, then batched inserts
Downtime
None planned for the primary
Typical timeline
4 to 8 weeks

Typical situation

Trigger. Report queries compete with checkout or sign-up traffic on the primary database.

Versions. PostgreSQL 14 or later with logical replication; a current ClickHouse release.

  • One write path in the application
  • Dashboards should stay under a few seconds
  • No downtime for the primary

A typical situation, not a named customer.

To offload analytics from PostgreSQL, OSStend designs change capture from the primary into ClickHouse, moves only the append-heavy tables that cause the load, and leaves transactional tables in PostgreSQL. The application keeps one write path and dashboards read from ClickHouse.

Customers

  • Microsoft logo
  • Henry Schein logo
  • Enbridge logo
  • Gojek logo

Partners

  • Broadcom logo
  • Redis logo
  • VMware Tanzu logo
  • OSSeva logo
160+Enterprise customers
10+Years running these systems
24/7Engineers on call
3Places it runs: our cloud, yours, your data center
Engines we run, on the platforms you already use
  • PostgreSQL
  • MySQL
  • MongoDB
  • Redis
  • Valkey
  • OpenSearch
  • Kafka
  • RabbitMQ
  • AWS
  • Google Cloud
  • Azure
  • Kubernetes
  • OpenShift
  • Prometheus
  • Grafana
  • Datadog
  • Dynatrace
  • Splunk
Compare

What OSStend runs and what you keep

OSStend designs and operates the pipeline and the ClickHouse side. You keep the application and the PostgreSQL schema.

AreaOSStendYou
Query reviewRank slow queries by load, pick tables to moveShare pg_stat_statements output
Capture setupLogical slot, publication and connector settingsAllow logical replication on the primary
ClickHouse schemaORDER BY and partitions chosen for the dashboardsApprove column mapping
Initial loadSnapshot, then catch-up from the slotProvide a read window
Pipeline runLag, errors, schema changes handledTell us about migrations in advance
Application changesAdvice on pointing reports at ClickHouseChange the report queries
On callEngineers 24/7 on both sidesReach us by phone or ticket

Where it can run

Most offloads start in OSStend's cloud and move into your account when the data policy asks for it.

OptionWhen it fitsLicence and source
Our cloudFast start with a dedicated clusterClickHouse Apache-2.0, PostgreSQL licence (ClickHouse licence, checked 23 Nov 2026)
Your cloud accountData policy keeps copies in your accountSame licences. See bring your own cloud.
Your data centerThe primary already runs on premisesSame licences
How it works

How we run it

We design before we copy anything, then load, compare and switch the reports one at a time.

  1. Find the load (3 to 5 days)

    We rank queries from pg_stat_statements by total time and pick the tables worth moving.

  2. Design (1 to 2 weeks)

    We map each moved table to a ClickHouse table, set the sorting key and decide how deletes and updates are handled.

  3. Initial load (1 to 2 weeks)

    A consistent snapshot loads first, then the logical slot catches up. See change data capture.

  4. Compare (1 to 2 weeks)

    We check row counts and sample query results between PostgreSQL and ClickHouse.

  5. Switch reports (1 to 5 days)

    Reports move one by one. PostgreSQL is untouched, so rollback is a config change.

  6. Run (from day one)

    We run the pipeline and cluster 24/7. See how it works.

Cost basis

The saving comes from keeping the PostgreSQL primary smaller, not from the ClickHouse line alone. OSStend's price is quoted per design.

Compare two futures: scale the primary up to carry reports, or hold it at its current size and add a ClickHouse cluster. The first grows with data and query count. The second grows with data only, and compressed columnar storage is usually smaller than the row store. We do not assume a ratio; we measure one table.

OptionWhat growsWhat you pay for
Scale the primaryCPU, memory, IOPS and replicasLarger instance classes, more replicas
Offload to ClickHouseClickHouse storage and a pipelineA dedicated cluster, quoted per design
Read replica onlyReplica countAnother full copy, same engine limits

A read replica helps with load but keeps the row-store limits. Use the TCO calculator to compare with your numbers.

What we watch on call

An offload adds one moving part. These are the failure patterns we watch for in the pipeline and the target.

Replication slot lag.
An idle or slow consumer makes PostgreSQL keep WAL. We watch confirmed_flush_lsn and disk free on the primary.
Schema drift.
A new column or type change in PostgreSQL can stop the pipeline. We review migrations ahead of release.
Duplicate or missing rows.
We run a count and checksum comparison on a schedule.
Small inserts.
Per-row inserts create too many parts. We batch on the pipeline side.
Update-heavy tables.
Frequent updates fit ClickHouse poorly. We flag tables that should stay in PostgreSQL.
Dictionary staleness.
Lookup tables loaded as dictionaries must refresh on a clear schedule.
Enterprise only

When OSStend is not the right fit

This fits teams whose reports hurt transactional latency and whose data is mostly append-only.

Contact us if

  • Report queries slow the primary at peak
  • Most big tables are append-heavy
  • You can accept seconds of lag on dashboards
  • You want one engineer team for both engines
Talk to an engineer

Not a fit if

  • Your reports need to read their own writes instantly
  • Most tables are updated row by row all day
  • The primary is small and a replica solves it
  • You want to replace PostgreSQL entirely
FAQ

Questions buyers ask

These are the questions we hear most on this situation. Each answer is general; the design review settles the figures for your estate.

Talk to an engineer →

Do we need to change the application's write path?

No. The application keeps writing to PostgreSQL. Only the report queries change, and they change one at a time.

How fresh is the data in ClickHouse?

Typically seconds to a minute behind, set by batch size. The design states the target lag.

What about deletes and updates?

We choose per table: ReplacingMergeTree, a deleted flag or a periodic rebuild. Tables with heavy updates often stay in PostgreSQL.

Can OSStend also run the PostgreSQL side?

Yes. See managed PostgreSQL. A single contract covers both engines.

Talk to an engineer

Find the queries worth moving

Send your top queries by total time and we will tell you which tables to move first.

  • A design sketch for your workload, not a plan menu
  • A zero-downtime cutover path for what you run today
  • A price for that design, after the review
See pricing →

Your request goes to the OSStend team. No newsletter sign-up.

Get a quoteTalk to an engineer
2Engines Optional
3Where should it run?
4What do you need?

Your request goes to the OSStend team. No newsletter sign-up.