Welcome 🥮
pg_mooncake v0.2
is in preview. Expect frequent updates. Join our community for the latest.
pg_mooncake is a Clickhouse alternative for real-time analytics on your Postgres tables.
It allows you to create a columnstore copy of your updating Postgres tables that is transactionally consistent (sub-second latency).
Queries on columnstore tables are executed by DuckDB and rank among the fastest on ClickBench; columnstore data is stored as Iceberg tables (parquet + metadata).
pg_mooncake is maintained by Mooncake Labs. It packages Moonlink, a real-time storage engine for Apache Iceberg, as a Postgres extension.
The Problem
To run fast analytics queries on Postgres tables, developers typically replicate data into specialized analytics databases like ClickHouse, creating two key challenges:
- Complex ETL pipelines and data modeling
- Maintaining transactional consistency between OLTP and columnstore. Columnar systems often struggle with concurrent updates/deletes, and often store multiple copies of data.
pg_mooncake creates real-time columnstore copies of your Postgres tables with efficient updates/deletes. No CDC, ETL, or data modeling required.
It is the the first real-time columnstore built into Postgres. Read more about Architecture.
Why You'll Love pg_mooncake
- Analytics on latest transactions: Run OLAP queries on latest Postgres state.
- Sub-Second Postgres to Iceberg Sync: Create Iceberg tables that automatically stay synchronized with your Postgres data.
- Trivial to get started: One line of SQL to create an Iceberg table that's always in sync with your Postgres data.
Get Started
- Join our community
- ⭐ Star pg_mooncake on GitHub
- Check out moonlink. The first real-time Postgres to Iceberg CDC.
- Follow us on X/Twitter