ClickHouse Partnership, improved Postgres Replication, and Disk Management
Supabase and ClickHouse are partnering around a Postgres-for-transactions, ClickHouse-for-analytics stack that is becoming common among AI companies. The Supabase ClickHouse foreign data wrapper now supports ClickHouse parameterized views, so query parameters can be passed from Postgres into ClickHouse. Thirteen Postgres replication and memory parameters, including max_slot_wal_keep_size and max_wal_size, are now configurable through the CLI. This targets PeerDB CDC pipelines, where the default 1GB WAL limit could cause data loss. Disk space can also be split between database and WAL, for example 6GB/2GB on the Pro plan.
Related posts
- PostgreSQL + ClickHouse as the Open Source unified data stack
ClickHouse easyNovice
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. Two patterns are described: CDC replication for operational analytics on application data, and split-writes for high-volume logs, metrics and events that never need to live in Postgres. Adopting it involves creating a ClickHouse database, replicating via PeerDB, configuring pg_clickhouse and pointing queries at its tables, so application changes stay minimal. A managed version in ClickHouse Cloud swaps PeerDB for ClickPipes and preinstalls the extension.
- Postgres at Open House NYC
ClickHouse easyNovice
ClickHouse used its Open House NYC keynote to launch WalShadow, an open-source engine that replicates Postgres into ClickHouse from the physical WAL instead of logical replication. It decodes WAL outside the source and uses a schema-only shadow Postgres to track DDL, effectively making ClickHouse an analytical physical standby. On 8-vCPU instances it showed about 200 ms commit-to-visible latency and 300K rows/s, versus about 10 s and 120K rows/s for PeerDB. The keynote also opened a Google Cloud private preview of ClickHouse Managed Postgres and released a chdb Postgres extension that extends COPY to import from S3, GCS and Azure and outperformed DuckDB-based extensions on the NYC Taxi import benchmark.
- Enhancing Postgres to ClickHouse replication using PeerDB
ClickHouse mediumAdept
PeerDB hardened its Postgres-to-ClickHouse CDC pipeline in four ways. It continuously drains the logical replication slot into an S3 stage, so WAL can't pile up when ClickHouse is down. It tunes ClickHouse memory settings (max_block_size, max_insert_block_size, max_threads, memory_overcommit_ratio_denominator, dial_timeout) to stop out-of-memory and overcommit-tracker failures on small clusters. It adds Lua row-level transformations for things like PII masking. On the security side, it uses short-lived IAM role credentials plus attribute-based access control on its multi-tenant S3 staging buckets.
- Postgres CDC in ClickHouse, A year in review
ClickHouse mediumAdept
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. Key engineering changes include keeping logical replication connections open, because reconnects re-read WAL from restart_lsn and spiked lag. CTID block-based partitioning cut initial-load partition generation from 7+ hours to under a second, and 50+ pre-flight checks plus bucketed user-facing alerts cut on-call load by orders of magnitude. The biggest remaining gap is data modeling overhead from ReplacingMergeTree's asynchronous deduplication, which ClickHouse plans to address with lightweight UPDATEs and unique indexes.
- A universal interface: How QuintoAndar made ClickHouse plug-and-play with managed Postgres
ClickHouse easyNovice
QuintoAndar's customer data platform replaced a Lambda architecture (a Postgres hot layer plus Kafka Connect into a Delta landing zone processed by 24/7 Databricks jobs with costly MERGE INTO deduplication) by having its event gateway write about 900 million monthly events directly into ClickHouse Cloud, which also serves roughly 300 million API requests a month with sub-second reads. Hightouch's Customer Studio doesn't support ClickHouse as a source, so the team put ClickHouse Managed Postgres in front of it. The pg_clickhouse extension exposes ClickHouse tables as foreign tables, pushes joins and aggregations down to ClickHouse, and keeps Hightouch's Lightning Sync state tables in Postgres. The team reports negligible overhead from the extra hop, and any Postgres-compatible tool can now reach ClickHouse.