# Mooncake Documentation

> Unified documentation hub for the PostgreSQL real-time columnstore and Apache Iceberg v2 lakehouse suite: pg_mooncake (v0.3.0), moonlink (v0.0.1), and duckdb_mooncake (v0.0.2).

---

LLMS index: [llms.txt](/llms.txt)

---

## Core Documentation


- [Introduction \& Architecture](/docs/intro/) (v0\.3\.0) — Explore the Mooncake architecture: how `pg_mooncake`, `moonlink`, `duckdb_mooncake`, and `pg_duckdb 1.2.0` work together, and how `v0.2` / `v0.3` evolved from `v0.1`.
- [Getting Started](/docs/getting-started/) (PG 14–18) — Install `pg_mooncake` and `pg_duckdb` via Pigsty packages or build from source, run the Hello World columnstore mirror tutorial, and review known limitations.
- [SQL \& Config Reference](/docs/reference/) (API) — Complete reference for `mooncake.create_table`, `create_snapshot`, `optimize_table`, `list_tables`, query shapes, Iceberg S3/R2 configuration, and external data lake scans.
- [Use Cases \& Patterns](/docs/use-cases/) — Architectural patterns for real-time operational analytics (HTAP), time-partitioned table archiving, the zero-ETL Postgres lakehouse, and OpenTelemetry log analytics.
- [v0\.1 Archive \(Delta Lake\)](/docs/v0.1/) (Deprecated) — Complete historical reference archive for `pg_mooncake v0.1` (`USING columnstore` + Delta Lake storage), preserved for legacy deployments and Wayback URL compatibility.
- [About\, Licensing \& SBOM](/docs/about/) (PGSTY) — PGSTY community stewardship, `MIT` and `BSL-1.1` linking exception licensing, Wayback Machine recovery provenance, and Cargo security dependency audit reports.


## Component Deep Dives


- [System Architecture](/docs/intro/architecture/) — Write path (`Logical WAL` -> `Moonlink`), read path (`pg_duckdb` -> `duckdb_mooncake`), and dual-format storage (in-memory Arrow + Parquet + Apache Iceberg v2).
- [Moonlink Ingestion Engine](/docs/intro/moonlink/) — Real-time CDC streaming, Arrow write buffers, Roaring Bitmap deletion vectors, LSN snapshot barriers, and standalone `moonlink_service` REST/RPC deployment.
- [duckdb\_mooncake \& DuckDB 2\.0](/docs/intro/duckdb-mooncake/) — How `duckdb_mooncake v0.0.2` connects DuckDB 2.0 and `pg_duckdb 1.2.0` to Moonlink metadata and performs multi-file Parquet statistics pruning.
- [Create Columnstore Mirror](/docs/reference/create-columnstore/) — Replicate local or remote (`src_uri`) PostgreSQL heap and partitioned tables into `USING mooncake` columnstore mirrors with `CALL mooncake.create_table(...)`.
- [Apache Iceberg \& Object Storage](/docs/reference/iceberg/) — Configure `mooncake.default_bucket` for AWS S3 or Cloudflare R2, materialize snapshots with `mooncake.create_snapshot`, and query from external engines.
- [Query External Data Lakes](/docs/reference/query-data-lake/) — Query external Parquet, CSV, JSON, Apache Iceberg, Delta Lake, and HuggingFace datasets directly inside PostgreSQL and join them with heap tables.

---

Section pages:

- [Welcome to pg_mooncake](/docs/intro/): Overview of pg_mooncake (v0.3.0), real-time columnstore mirror tables, Moonlink CDC ingestion, and DuckDB 2.0 vectorized execution in PostgreSQL.
- [Get Started & Installation](/docs/getting-started/): Install pg_mooncake (v0.3.0) and pg_duckdb (1.2.0) with Pigsty packages or build from source on PostgreSQL 14–18, configure postgresql.conf, and enable the extension.
- [SQL Procedures, Views & Configuration Reference](/docs/reference/): Complete SQL API and GUC configuration reference for pg_mooncake (v0.3.0), including mooncake.create_table, create_snapshot, optimize_table, list_tables, and DuckDB settings.
- [Use Cases & Architecture Patterns](/docs/use-cases/): Production architecture patterns for pg_mooncake (v0.3.0): real-time operational analytics (HTAP), large table partition archiving, zero-ETL Postgres lakehouse, and OpenTelemetry log analytics.
- [v0.1 Archive: Welcome to pg_mooncake (Delta Lake)](/docs/v0.1/): Historical documentation archive for pg_mooncake v0.1 (USING columnstore + Delta Lake storage engine).
- [About](/docs/about/): Project stewardship, historical roadmap, licensing, upstream attribution, trademark policy, and SBOM for the PGSTY Mooncake ecosystem.

---

Backlinks:

- [Page Not Found](/404/)
