Introducing pg_clickhouse: A Postgres extension for querying ClickHouse
Blog post from ClickHouse
pg_clickhouse v0.1.0 is a newly released PostgreSQL extension designed to facilitate the migration of analytical queries from PostgreSQL to ClickHouse, addressing the challenges faced during such migrations. This extension allows queries to be executed on ClickHouse directly from PostgreSQL without modification, by pushing down query execution to ClickHouse and providing a foundation for ongoing query evolution. The development of pg_clickhouse involved building on existing foreign data wrappers like clickhouse_fdw but added improvements such as universal pushdown for analytics queries, support for advanced aggregations, and compatibility with newer PostgreSQL and ClickHouse versions. The extension also features SEMI-JOIN pushdown and enhanced query performance, particularly for decision support workloads like TPC-H. Future developments aim to extend pushdown coverage, optimize query planning, and support additional PostgreSQL functions and ClickHouse data types. Users are encouraged to install pg_clickhouse from GitHub or PGXN releases and to provide feedback on any pushdown issues encountered.