Introducing chdb Postgres extension: High-performance imports from cloud storage
chdb is a new Postgres extension that uses the in-process ClickHouse engine chDB to import and export data in dozens of formats (CSV, JSON, Parquet, Avro, Arrow, ORC, Protobuf and more) from S3, GCS, Azure, HDFS, HTTP and local files, via a chdb_query() function and a chdb_hook module that extends COPY and CREATE TABLE. Importing a 1M-row NYC Taxi dataset from S3, pg_duckdb and pg_lake took 2-3x longer than chdb, and only aws_s3, which supports far fewer formats, came close. Rather than linking chDB into the backend or running a persistent service, chdb starts a helper process on demand and streams ClickHouse Native-format results over file descriptors, then exits, so the Postgres server pays no lasting memory cost and is isolated from out-of-memory failures. Type mapping goes through pg-clickhouse-c, with a structure option to override mappings such as Postgres JSON to ClickHouse JSON.
Related posts
- Longbridge Technology simplifies their architecture and achieves 10x performance boost with ClickHouse
ClickHouse mediumAdept
Longbridge, a Singapore online brokerage, replaced a fragmented market-data stack of PostgreSQL (historical), Redis (real-time) and DynamoDB (high-write) with ClickHouse after evaluating it against TimescaleDB and TDengine for write throughput, Decimal support, time functions and aggregations. Historical data was migrated via ClickHouse external tables over OSS and Alibaba Cloud DTS, which merged 128 PostgreSQL sub-tables into one table and converted varchar fields to Decimal; Redis was kept for real-time data with ticker-level writes moved to ClickHouse. Reported results include about 5x compression (500GB down to 100GB), 10x faster single-table writes than PostgreSQL, and built-in aggregation and window functions replacing scheduled statistics jobs.
- 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 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.
- Welcome, chDB
ClickHouse mediumAdept
chDB is a community-built embedded SQL OLAP engine that packages ClickHouse as an in-process Python module, similar in spirit to DuckDB, for local analytics, ETL and exploration without running a server. Instead of shelling out to clickhouse-local via pipes, which adds 10–50 ms of process startup per query and copies results, chDB hooks into ClickHouse's read/write buffers and exchanges data through MemoryView. Examples show querying Parquet and gzipped CSV on S3 with schema inference, returning results as CSV, Pandas DataFrames or Arrow tables, and running SQL directly over DataFrames. Bindings for Rust, Node.js and Go, persistent sessions backed by MergeTree, UDFs and ARM64 support are in progress or recently added.
- How we migrated Clera’s 500 GB production database to ClickHouse Managed Postgres overnight
ClickHouse mediumAdept
Clera moved a 500 GB, 500+ table production Postgres database from the EU to the US overnight onto ClickHouse Managed Postgres, with production traffic still running, using two parallel ClickPipes pipelines. The vendor choice followed a replay of their real workload (hot reads, point lookups, background analytics) on Supabase, Neon, PlanetScale and ClickHouse, plus sysbench TPC-C at 8–128 threads. Local NVMe storage beat network-attached storage, with 16–42% higher TPS than PlanetScale out of the box, and CPU fell from days at 100% to 10–20%. The hard parts were extension portability, restoring triggers, rebuilding indexes, resequencing tables, and doing parity checks before cutover.