Welcome 🥮
pg_mooncake is a Postgres extension that adds columnstore tables and DuckDB for fast analytics.
Postgres with pg_mooncake ranks among the fastest analytic databases on Clickbench. The extension is maintained by Mooncake Labs.
The Problem
Postgres is not designed for analytics — it lacks columnar storage and a vectorized execution engine. This leaves Postgres users with the following choices:
-
Adopt a separate analytics system (e.g., ClickHouse, Elasticsearch)
This involves complex data modeling, creates challenges when querying transactional and analytical data together, and introduces inconsistencies between systems.
-
Adopt a Postgres native offering
While solutions like Citus & Timescale add columnar storage, they lack a vectorized execution engine to fully leverage the format. Meanwhile, pg_duckdb cannot transactionally write data into columnar format.
pg_mooncake adds columnstore tables to Postgres with both storage and compute capabilities that can leverage the columnar format.
Why you'll love pg_mooncake
-
Transactional inserts, updates, and deletes into columnstore tables
-
Modern columnstore built on object storage — no disks to manage
-
Data written as Iceberg / Delta Lake tables (parquet + metadata)
-
Seamless joins between transactional and columnstore tables