About pg_mooncake
pg_mooncake is a Postgres extension for running real-time analytics directly on Postgres tables. It creates a columnstore mirror of a regular table in Apache Iceberg format, so analytical queries can run quickly against data that is only moments old. It is aimed at teams that want analytics on transactional data without building a separate warehouse pipeline.
Ingestion is handled by moonlink, which streams and batches inserts, updates and deletes into the mirror. Queries are accelerated by DuckDB, and you query the mirrored table like any other Postgres table. Because the data is stored in Iceberg, it can also be read by other query engines, which keeps the analytical copy open to the rest of a data stack.
The simplest way to try it is the Docker image, which starts Postgres with the extension installed. It can also be built from source with Rust, pgrx and DuckDB build tools for Postgres versions 14 through 18, and requires adding it to shared preload libraries and enabling logical replication. The project is written in Rust and licensed under MIT.
Key features
- Columnstore mirror of Postgres tables in Iceberg
- Real-time ingestion of inserts, updates and deletes
- DuckDB-accelerated analytical queries
- Query mirrored tables with ordinary SQL
- Iceberg data readable by other engines
- Docker image for quick start
Good fit for
- →Running analytics on live Postgres data
- →Avoiding a separate warehouse for reporting
- Tags
- postgres
- analytics
- iceberg
- duckdb
- columnstore
- lakehouse
- rust
- olap
pg_mooncake: questions and answers
- What is pg_mooncake used for?
- pg_mooncake is a Postgres extension that mirrors tables into an Iceberg columnstore for fast, fresh analytics queries using DuckDB. It is a good fit for running analytics on live Postgres data and avoiding a separate warehouse for reporting.
- Is pg_mooncake open source?
- Yes. pg_mooncake is open source under the MIT licence. Its source code is on GitHub at Mooncake-Labs/pg_mooncake and is written mainly in Rust.
- Is pg_mooncake free?
- Yes. pg_mooncake is open source, so the software itself is free to use.
- Can I self-host pg_mooncake?
- Yes. pg_mooncake can be self-hosted on your own server or infrastructure.
- What are some alternatives to pg_mooncake?
- Similar open-source tools in the Databases category include Databend, Apache Doris and StarRocks. SaaS products in the same category include MotherDuck, Amazon Redshift and SAP HANA.
- Is pg_mooncake actively maintained?
- The most recent commit to pg_mooncake was on 31 March 2026, and the latest release is v0.1.2, published on 12 February 2025. The project has 2k stars on GitHub.
Open-source alternatives to pg_mooncake
See all
Databend
Databases
Data Agent Ready Warehouse : One for Analytics, Search, AI, Python Sandbox. — rebuilt fr
OSSvs Snowflake★ 9.5k
Apache Doris
Databases
Apache Doris is a real-time analytics and hybrid search database for AI agents.
Apache-2.0vs Snowflake★ 16k
StarRocks
Databases
The world's fastest open query engine for sub-second analytics both on and off the data la
Apache-2.0vs Snowflake★ 12k
GlareDB
Databases
GlareDB: A light and fast SQL database for analytics
MITvs MotherDuck★ 1k
ClickHouse
Databases
ClickHouse is a fast open-source column-oriented database management system that allows ge
Apache-2.0vs Snowflake★ 50k
DuckDB
Databases
DuckDB is an analytical in-process SQL database management system
MITvs MotherDuck★ 42k
SaaS alternatives to pg_mooncake
See all
MotherDuck
Databases
Managed cloud service for DuckDB analytics
SaaS
Amazon Redshift
Databases
Managed cloud data warehouse on AWS for SQL analytics at scale
SaaS
SAP HANA
Databases
In-memory database and data platform from SAP for transactional and analytical workloads
SaaS
Starburst
Databases
Data lakehouse analytics platform built on the Trino query engine
SaaS
Amazon Athena
Databases
Serverless interactive query service for analyzing data in Amazon S3 with SQL
SaaS
Azure Data Explorer
Databases
Analytics service on Azure for exploring log, telemetry and time-series data with Kusto queries
SaaS

