pg_mooncake

maintenance

by Mooncake Labs (Databricks) · since 2024 · also known as Mooncake, moonlink

Postgres extension that mirrors tables into Iceberg columnstores for real-time analytics via DuckDB.

columnar / olaprelationalextensionopen source (permissive)emerging

maintenance. Mooncake Labs was acquired by Databricks (Oct 2025) for Lakebase; the public repo has had no commits since Oct 2025.

Overview

pg_mooncake adds real-time analytics to PostgreSQL by maintaining a columnstore mirror of regular Postgres tables in Apache Iceberg, fed by the moonlink engine with sub-second freshness for inserts, updates and deletes. Analytical queries run through DuckDB (it is now a sub-extension of pg_duckdb), while other engines can read the Iceberg tables directly. Databricks acquired Mooncake Labs in October 2025 to strengthen its Postgres-based Lakebase, and the public repo has seen almost no activity since, so treat it as promising technology with an uncertain open-source future.

Strengths & trade-offs

Strengths

  • +Analytics on live Postgres tables without ETL
  • +Columnstore mirror written as open Iceberg tables
  • +DuckDB execution ranks near the top of ClickBench
  • +MIT-licensed

Trade-offs

  • −Development has stalled since the Databricks acquisition
  • −Young code base with few production references
  • −Requires pg_duckdb and a Rust build toolchain

Great for

  • +Real-time dashboards on Postgres data
  • +Mirroring Postgres tables to Iceberg
  • +HTAP experiments

Think twice for

  • −Production systems needing long-term support
  • −Multi-node analytics at scale

Capabilities

Native or official first-party support · 6 of 25 tracked

✓Transactions
✓Joins
✓JSON
✓Columnar storage
✓Durable persistence
✓Compression
–Secondary indexes
–Full-text search
–Vector search
–Geospatial
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–TTL / expiry
–Pub/Sub
–In-memory
–Encryption at rest
–Role-based access
–Time travel
–Branching
–Online schema changes
–Streaming ingest
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Small · ≤ 100 GB
Horizontal scaling
None
Multi-region
No
Transactions
Full ACID
Consistency
Strong
Schema
Strict
Architecture
Single node, Client server
Query languages
SQL, PL/pgSQL

Runs inside one Postgres instance; columnstore data can live in object storage as Iceberg.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

compatible withPostgreSQL
apis & protocolsPostgreSQL wire protocol
client languagesC, Java, Python, JavaScript, Go

Alternatives to pg_mooncake

Compare all→
pg_duckdbRelational14.9

PostgreSQL extension that embeds DuckDB's vectorized engine for fast analytics and data-lake queries.

pg-mooncake vs pg-duckdb →
HydraColumnar / OLAP3.0

Columnar storage extension for Postgres from Hydra; dormant after the team joined Supabase in 2026.

pg-mooncake vs hydra-columnar →
CitusRelational21.1

Postgres extension that shards tables across nodes for multi-tenant SaaS and real-time analytics.

pg-mooncake vs citus →
Databricks LakebaseRelational0.8

Databricks' serverless Postgres built on Neon tech, with branching and sync to Delta tables in Unity Catalog.

pg-mooncake vs lakebase →
DuckDBColumnar / OLAP63.7

In-process columnar SQL database: the SQLite of analytics, running inside your app or notebook.

pg-mooncake vs duckdb →
ClickHouseColumnar / OLAP69.8

Open-source columnar OLAP database known for very fast aggregations over billions of rows.

pg-mooncake vs clickhouse →

pg_mooncake FAQ

What is pg_mooncake?

pg_mooncake is a columnar / OLAP database by Mooncake Labs (Databricks), first released in 2024. pg_mooncake adds real-time analytics to PostgreSQL by maintaining a columnstore mirror of regular Postgres tables in Apache Iceberg, fed by the moonlink engine with sub-second freshness for inserts, updates and deletes. Analytical queries run through DuckDB (it is now a sub-extension of pg_duckdb), while other engines can read the Iceberg tables directly. Databricks acquired Mooncake Labs in October 2025 to strengthen its Postgres-based Lakebase, and the public repo has seen almost no activity since, so treat it as promising technology with an uncertain open-source future.

Is pg_mooncake open source?

Yes. pg_mooncake is open source. License: MIT License.

Does pg_mooncake support ACID transactions?

Yes. pg_mooncake supports full ACID transactions, with strong consistency.

Does pg_mooncake scale horizontally?

pg_mooncake does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB).

How can I run pg_mooncake?

You can self-host it.

What is pg_mooncake best for?

pg_mooncake is a strong fit for real-time dashboards on Postgres data, mirroring Postgres tables to Iceberg and HTAP experiments. Think twice for production systems needing long-term support.

What are the best alternatives to pg_mooncake?

Common alternatives to pg_mooncake include pg_duckdb, Hydra, Citus, Databricks Lakebase and DuckDB. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

Is pg_mooncake still maintained?

pg_mooncake is in maintenance mode. Mooncake Labs was acquired by Databricks (Oct 2025) for Lakebase; the public repo has had no commits since Oct 2025.

How popular is pg_mooncake?

pg_mooncake ranks #285 of 844 databases on the WhichDB Score (11.2/100), and #29 among columnar / OLAP databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.