Skip to content

This is the multi-page printable view of this section. .

Return to the regular view of this page.

About

Project stewardship, historical roadmap, licensing, upstream attribution, trademark policy, and SBOM for the PGSTY Mooncake ecosystem.

mooncake.pgsty.com is the companion documentation and engineering site for the PGSTY forks of the Mooncake real-time analytics ecosystem for PostgreSQL and DuckDB:

Repository Current Tag License Upstream Origin Description
pgsty/pg_mooncake v0.3.0 MIT Mooncake-Labs/pg_mooncake Columnstore table extension for PostgreSQL (pgrx 0.19.3, pg_duckdb 1.2.0).
pgsty/duckdb_mooncake v0.0.2 MIT Mooncake-Labs/duckdb_mooncake DuckDB 2.0.0 storage extension attaching to Moonlink real-time Iceberg tables.
pgsty/moonlink v0.0.1 BSL-1.1 + Exception (MIT client crates) Mooncake-Labs/moonlink Rust engine ingesting real-time streaming updates and CDC into Apache Iceberg and Parquet.

Sections

Historical upstream v0.2 feature roadmap and current PGSTY maintenance focus (v0.3.0+).

MIT, BSL-1.1 with the PG_MOONCAKE LINKING & DISTRIBUTION EXCEPTION, and CC-BY-4.0 documentation terms.

Mooncake Labs origins, Wayback Machine documentation recovery provenance, and repository lineage.

Trademark acknowledgments and independence statement for the PGSTY distribution.

Submodule pin matrix (versions.json) and the 2026-11-05 Cargo RustSec dependency security audit.

1 - Roadmap

Historical v0.2 feature roadmap from Mooncake Labs and current PGSTY maintenance focus.
Note

The roadmap items below reflect the historical upstream pg_mooncake v0.2 design goals published at docs.mooncake.dev/pg/roadmap, together with the current maintenance scope of the pgsty/pg_mooncake fork (v0.3.0).


PGSTY Maintenance Focus (v0.3.0+)

The PGSTY fork of the Mooncake suite (pg_mooncake v0.3.0, duckdb_mooncake v0.0.2, moonlink v0.0.1) prioritizes long-term production stability, PostgreSQL version coverage, and security hardening:

  1. PostgreSQL 14–18 Compatibility: Keeping pg_mooncake synchronized with current pgrx (0.19.3) across PostgreSQL 14, 15, 16, 17, and 18 on Linux (x86_64 and aarch64, RHEL/Rocky EL8–EL10, Debian 12/13, Ubuntu 22.04/24.04).
  2. DuckDB 2.0.0 & pg_duckdb 1.2.0 Alignment: Maintaining ABI compatibility between pg_mooncake, pg_duckdb, and duckdb_mooncake as DuckDB evolves its TableCatalogEntry, TableFilterSet, and StorageExtension APIs.
  3. Correctness & Fail-Fast Guards: Enforcing runtime pg_duckdb version checks, LSN-consistent snapshot reads on columnstore tables, automatic REPLICA IDENTITY FULL propagation across partitioned table hierarchies, and explicit 0A000 errors on deprecated helpers.
  4. Dependency Security Hygiene: Regularly auditing and upgrading Rust dependencies across all three lockfiles (pg_mooncake, moonlink, duckdb_mooncake/moonlink_ffi) against the RustSec Advisory Database.

Historical Upstream Roadmap (v0.2)

The following four capabilities were outlined by Mooncake Labs for the v0.2 architecture:

1. Columnstore Table for Logs / Events

Introduce an append-only mode for columnstore tables:

  • Optimized for streaming ingestion and out-of-order inserts.
  • Built-in time-based partitioning and retention policies.
  • Targeted at observability, telemetry, and high-throughput event pipelines.

2. Native Columnstore Tables (Without a Backing Rowstore)

Create and write directly to a columnstore table without requiring a companion PostgreSQL heap table:

CREATE TABLE table_name (
    ...
) USING columnstore;
  • Supports standard INSERT, SELECT, UPDATE, DELETE, and COPY directly against the columnstore access method.
  • Note: Native USING columnstore tables were available in v0.1 (Delta Lake), whereas v0.2 and v0.3.0 use mooncake.create_table(dst, src) to mirror a PostgreSQL heap table via logical replication.

3. Write to Existing Iceberg Tables

Create a columnstore mirror in PostgreSQL that writes into an existing external Apache Iceberg table managed by a REST or JDBC catalog, allowing bilateral interoperability with Spark, Trino, and Flink writers.

4. Query Routing & Partitioned Tables

Transparently route analytical queries across hybrid rowstore + columnstore partitioned hierarchies without requiring manual UNION ALL queries or explicit dual-table references.

2 - License

Open-source and source-available licenses across pg_mooncake, duckdb_mooncake, moonlink, and mooncake.pgsty.com.

The PGSTY Mooncake ecosystem preserves the exact upstream license terms of each repository created by Mooncake Labs, Inc.


Summary by Repository

Component Repository License Notes
pg_mooncake pgsty/pg_mooncake MIT Permissive open-source license (Copyright (c) 2024 Mooncake Labs).
duckdb_mooncake pgsty/duckdb_mooncake MIT Permissive open-source license (Copyright (c) 2025 Mooncake Labs).
moonlink (Engine) pgsty/moonlink BSL-1.1 + Exception Business Source License 1.1 with the PG_MOONCAKE LINKING & DISTRIBUTION EXCEPTION, converting to Apache-2.0 on 2029-05-05.
moonlink (Client Crates) moonlink_rpc, moonlink_proto, moonlink_error, moonlink_table_metadata MIT Explicitly licensed under MIT so pg_mooncake and duckdb_mooncake remain pure MIT works when linking against them.
Documentation Site pgsty/mooncake.pgsty.com CC-BY-4.0 / Apache-2.0 Documentation prose under Creative Commons Attribution 4.0 International (CC-BY-4.0); site build scripts under Apache-2.0.

pg_mooncake & duckdb_mooncake — MIT License

Both pg_mooncake and duckdb_mooncake are distributed under the MIT License:

MIT License

Copyright (c) 2024-2025 Mooncake Labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

moonlink is licensed under the Business Source License 1.1 (BSL-1.1) together with the PG_MOONCAKE LINKING & DISTRIBUTION EXCEPTION:

  • Licensor: Mooncake Labs, Inc.
  • Licensed Work: moonlink (v0.0.1)
  • Change Date: 2029-05-05
  • Change License: Apache-2.0 (Apache License, Version 2.0)

Additional Use Grant

You may make use of the Licensed Work provided that such use does not constitute Offering the Licensed Work as a Managed Service. “Offering the Licensed Work as a Managed Service” means providing third parties with access to functionality of the Licensed Work as part of a cloud service, software-as-a-service (SaaS), platform-as-a-service (PaaS), database-as-a-service (DBaaS), or similar hosted service where the primary value of the service derives substantially from the functionality of the Licensed Work itself, and competes with a commercial product or service offered by the Licensor.

Notwithstanding the foregoing, you may use the Licensed Work internally within your organization, including in production environments, and you may incorporate the Licensed Work into software applications or services provided to third parties so long as such services do not expose the Licensed Work itself (or a substantially similar data ingestion/columnstore management interface) as a managed service.

PG_MOONCAKE LINKING & DISTRIBUTION EXCEPTION

Because pg_mooncake embeds moonlink via FFI (pg_mooncake_moonlink_ffi) and duckdb_mooncake links moonlink_ffi, the upstream license includes an explicit linking and distribution exception:

1. MIT Client Crates. The client interface crates contained in this repository — specifically moonlink_rpc, moonlink_proto, moonlink_error, and moonlink_table_metadata — are separately licensed under the MIT License (see the LICENSE-MIT file in each crate directory) and are not part of the BSL-covered Licensed Work.

2. Linking Permission. You may compile, link (statically or dynamically), and combine the Licensed Work (moonlink, including pg_mooncake_moonlink_ffi) with pg_mooncake (and any MIT-licensed fork or derivative of pg_mooncake) to produce a combined binary or PostgreSQL extension package (a “Combined Extension”), without such linking causing the pg_mooncake source code itself to become subject to the Business Source License 1.1. The pg_mooncake source code remains governed by its own MIT License.

3. Binary Redistribution Permission. You may build, package, and redistribute a Combined Extension in source or binary form (including via Linux distribution repositories, container images, PGXN, Pigsty, Homebrew, or similar package managers) to third parties free of charge, provided that: (a) the Combined Extension includes or is accompanied by a copy of this LICENSE file; and (b) any recipient’s use of the moonlink portion of the Combined Extension remains subject to the terms and conditions of the Business Source License 1.1 above (in particular, the restriction against Offering the Licensed Work as a Managed Service).

4. Scope. This exception applies solely to linking and redistribution with pg_mooncake (and its MIT-licensed forks/derivatives) and duckdb_mooncake. It does not grant permission to offer the Combined Extension, or moonlink standalone, as a Managed Service in violation of the Additional Use Grant above.


Third-Party Bundled Submodules

The pg_mooncake repository also builds against two MIT/Apache-licensed submodules pinned in versions.json:

  • pg_duckdb (v1.2.0): MIT License (Copyright (c) 2024 Hydra, MotherDuck, and pg_duckdb contributors).
  • rust-postgres (14c8e599): Dual-licensed under Apache-2.0 OR MIT.

3 - Attribution

Upstream credits to Mooncake Labs, Wayback Machine documentation recovery provenance, and repository lineage.

Upstream Creators

pg_mooncake, duckdb_mooncake, and moonlink were created by Mooncake Labs. All core architectural credit — including the hybrid rowstore + columnstore design, the Moonlink real-time Iceberg buffer engine, logical replication WAL ingestion, and the DuckDB execution bridge — belongs to the original Mooncake Labs authors and contributors.


Repository Lineage

PGSTY Repository Upstream Source Upstream Baseline Commit PGSTY Release Tag
pgsty/pg_mooncake Mooncake-Labs/pg_mooncake v0.2.0 (be17cd0) + post-0.2 upstream commits v0.3.0 (1a9cbfd65be9a6486d020120acb49ef0c6800d68)
pgsty/duckdb_mooncake Mooncake-Labs/duckdb_mooncake ba79184 v0.0.2 (49765a369ad88986916ce53c969ed2ce4ba66fac)
pgsty/moonlink Mooncake-Labs/moonlink f2e1715 v0.0.1 (b298ef7444890e3c8af5544e350232518bcfd8e5)
pgsty/pg_duckdb duckdb/pg_duckdb v1.2.0 v1.2.0 (8756099e267c47f0b86c24de4cf995327f1f4279)

Documentation Provenance & Recovery

The original upstream documentation website (https://docs.mooncake.dev/) was taken offline after the upstream project transitioned direction, and no public documentation source repository remained available on GitHub.

To preserve the reference manuals for both v0.2 (Moonlink + Iceberg) and v0.1 (Delta Lake):

  1. Wayback Machine Snapshot Extraction: All 34 canonical documentation pages (17 v0.2 pages, 16 v0.1 pages, and 1 Moonlink overview page) plus 30 historical alias routes and 4 original architecture diagrams were recovered from the Internet Archive Wayback Machine snapshot (2025-12-07).
  2. Verification Against v0.3.0 Source: Every SQL function signature, configuration GUC, environment variable, and error code was cross-checked against the pgsty/pg_mooncake v0.3.0 source tree (pgrx 0.19.3, pg_duckdb 1.2.0, duckdb_mooncake v0.0.2, moonlink v0.0.1).
  3. Bilingual Translation & Engineering Reports: PGSTY added full Simplified Chinese translations (/zh/docs/) and published engineering reports covering the DuckDB 2.0 adaptation, pgrx 0.19.3 migration, and the 2026-11-05 RustSec dependency audit.

Every page adapted from the historical upstream documentation includes upstream_source and upstream_link metadata in its front matter.

4 - Trademark Policy

Trademark acknowledgments and independence statement for the PGSTY Mooncake distribution.

Independence Statement

mooncake.pgsty.com and the repositories under github.com/pgsty (pgsty/pg_mooncake, pgsty/duckdb_mooncake, pgsty/moonlink) are maintained independently by PGSTY (Pigsty) for the PostgreSQL open-source community.

This site and the packages distributed by Pigsty / PGEXT are not affiliated with, endorsed by, or sponsored by Mooncake Labs, Inc.


Third-Party Trademarks

  • Mooncake, pg_mooncake, duckdb_mooncake, and Moonlink are names originated by Mooncake Labs, Inc. They are used on this website solely for nominative, descriptive identification of the open-source PostgreSQL and DuckDB extensions and their compatibility lineage.
  • PostgreSQL and Postgres are registered trademarks of the PostgreSQL Community Association of Canada.
  • DuckDB is a trademark of the DuckDB Foundation / DuckDB Labs.
  • Apache Iceberg, Apache Parquet, Apache Arrow, and Apache are trademarks of the Apache Software Foundation.
  • Delta Lake is a trademark of LF Projects, LLC.
  • Pigsty and PGSTY are trademarks of Ruohang Feng (@Vonng).

5 - SBOM & Security Audit

Software Bill of Materials (versions.json), submodule pin matrix, and the 2026-11-05 Cargo RustSec dependency audit for pg_mooncake 0.3.0.

This page documents the exact submodule pin matrix (versions.json) and the dependency security audit performed for pg_mooncake v0.3.0, duckdb_mooncake v0.0.2, and moonlink v0.0.1.


Component & Submodule Pin Matrix (versions.json)

pgsty/pg_mooncake records its exact submodule and upstream dependency pins in versions.json:

Component Path Repository Tag / Branch Commit SHA License
pg_mooncake / pgsty/pg_mooncake v0.3.0 1a9cbfd65be9a6486d020120acb49ef0c6800d68 MIT
duckdb_mooncake duckdb_mooncake pgsty/duckdb_mooncake v0.0.2 49765a369ad88986916ce53c969ed2ce4ba66fac MIT
duckdb (nested) duckdb_mooncake/duckdb duckdb/duckdb v2.0.0 d54cbbe3df17e8e5ce68312f483b4155836112aa MIT
moonlink moonlink (duckdb_mooncake/moonlink) pgsty/moonlink v0.0.1 b298ef7444890e3c8af5544e350232518bcfd8e5 BSL-1.1 + Exception (MIT client crates)
pg_duckdb pg_duckdb pgsty/pg_duckdb v1.2.0 8756099e267c47f0b86c24de4cf995327f1f4279 MIT
rust-postgres rust-postgres sfackler/rust-postgres master 14c8e599f5551a8caa96ff5023685a6f537a1455 Apache-2.0 OR MIT

Core Rust Toolchain & Framework Pins

Dependency Version Role
pgrx / cargo-pgrx 0.19.3 PostgreSQL extension framework for Rust (PostgreSQL 14–18).
iceberg 0.6.0 Apache Iceberg table metadata and catalog client in moonlink.
arrow / parquet 55.2.0 Columnar memory format and Parquet writer in moonlink.
datafusion 48.0.1 Expression evaluation and pruning in moonlink.
opendal 0.53.1 Unified object storage abstraction (fs, s3, gcs, azblob).
tonic / prost 0.14.5 / 0.14.3 gRPC / IPC protocol serialization between pg_mooncake and moonlink.
tokio 1.53.0 Async runtime for background ingestion and object store I/O.

2026-11-05 Cargo Dependency Security Audit

All three Cargo workspaces were audited using cargo-audit 0.22.2 against the RustSec Advisory Database (commit 965bf9ad083b58e6340d65829d85217b18be9290, 927 advisories loaded).

Before vs. After Remediation Summary

Lockfile Before Audit After Remediation Reduction
pg_mooncake/Cargo.lock 33 vulnerabilities, 1 unsound, 19 warnings 6 vulnerabilities, 0 unsound, 15 warnings -27 vulnerabilities (-82%), -100% unsound
moonlink/Cargo.lock 46 vulnerabilities, 1 unsound, 28 warnings 15 vulnerabilities, 0 unsound, 24 warnings -31 vulnerabilities (-67%), -100% unsound
duckdb_mooncake/moonlink_ffi/Cargo.lock 1 vulnerability, 0 unsound, 0 warnings 0 vulnerabilities, 0 unsound, 0 warnings -100% (Clean)

Resolved Vulnerabilities

  • Direct / Major Upgrades:
    • tonic 0.12 -> 0.14.5, prost 0.13 -> 0.14.3 (resolved RUSTSEC-2026-0001 DoS via rkyv OOM and RUSTSEC-2024-0436 paste unmaintained in duckdb_mooncake).
    • bincode 1.3.3 -> 2.1.0 (serde compatibility path, resolved RUSTSEC-2025-0141).
    • opentelemetry 0.27 -> 0.31.0, opentelemetry-otlp 0.27 -> 0.31.1, tracing-opentelemetry 0.28 -> 0.32.1.
    • reqwest 0.12.20 -> 0.12.28, tokio-tar replaced via testcontainers 0.23.3 -> 0.27.2 (resolved RUSTSEC-2025-0065 PAX header parsing vulnerability).
  • Transitive Security Upgrades:
    • bytes 1.10.1 -> 1.11.1 (RUSTSEC-2026-0007: integer overflow in BytesMut::reserve).
    • quinn-proto 0.11.12 -> 0.11.14 (RUSTSEC-2026-0037: DoS in Quinn endpoints).
    • rustls 0.23.28 -> 0.23.37 and rustls-webpki 0.103.3 -> 0.103.12 (RUSTSEC-2026-0049, RUSTSEC-2026-0098, RUSTSEC-2026-0099: CRL distribution point and wildcard name constraint validation fixes).
    • aws-lc-rs 1.13.1 -> 1.16.3 and aws-lc-sys 0.29.0 -> 0.39.1 (7 PKCS7 / AES-CCM / X.509 timing and logic advisories).
    • lz4_flex 0.11.4 -> 0.11.6 (RUSTSEC-2026-0041: memory information leak).
    • tar 0.4.44 -> 0.4.45 (RUSTSEC-2026-0067 & RUSTSEC-2026-0068: PAX size header and symlink chmod vulnerabilities).
    • time 0.3.41 -> 0.3.47 (RUSTSEC-2026-0009: RFC 2822 stack exhaustion DoS).
    • wasmtime 29.0.1 -> 43.0.1 (df-wasm pinned to 43.0.1, eliminating 12 WASI/Wasmtime guest sandbox advisories and the regalloc2 unsoundness warning).
    • glib 0.20.12 -> 0.22.4 (resolved RUSTSEC-2026-0097 VariantStrIter unsoundness).

Remaining Transitive Advisories (Upstream-Blocked by iceberg 0.6.0 / arrow 55)

The remaining 6 advisories in pg_mooncake/Cargo.lock are transitive dependencies pulled in by iceberg 0.6.0 (which pins arrow 55, parquet 55, avro-schema 0.3, and reqwest 0.12) and deltalake-core 0.26.0 in moonlink:

  1. rsa 0.9.10 (RUSTSEC-2023-0071, Marvin Attack): pulled in transitively via iceberg-catalog-sql -> sqlx-mysql. Not used at runtime because moonlink disables default SQLx MySQL TLS features and only initializes PostgreSQL/REST Iceberg catalogs.
  2. md5 0.7.0 (RUSTSEC-2025-0146, crate renamed to md-5): pulled in by avro-schema 0.3.0.
  3. snappy 0.4.0 (RUSTSEC-2026-0046, integer truncation on >4 GiB buffers): pulled in by avro-schema 0.3.0; Avro metadata manifests in Iceberg are kilobytes to megabytes in size.
  4. rustls-webpki 0.102.8 (RUSTSEC-2026-0049, 0098, 0099): legacy 0.102 branch pulled in via reqwest 0.11 in iceberg 0.6 transitive tree; primary TLS connections use patched rustls-webpki 0.103.12.