Skip to main content
Version: 0.2

Welcome 🥮

Preview

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, and relies on Moonlink.

The Problem

To run fast analytics queries on Postgres tables, developers typically replicate data into specialized analytics databases like ClickHouse, creating two key challenges:

  1. Complex ETL pipelines and data modeling
  2. 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

  1. Analytics on latest transactions: Run OLAP queries on latest Postgres state.
  2. Sub-Second Postgres to Iceberg Sync: Create Iceberg tables that automatically stay synchronized with your Postgres data.
  3. Extremely trivial to get started: One line of SQL to create an Iceberg table that's always in sync with your Postgres data.

Get Started