Skip to content

pg_mooncake 0.3.3: Durable Snapshot Acknowledgements

pg_mooncake 0.3.3 fixes early acknowledgements in CALL mooncake.create_snapshot(…) via Moonlink v0.3.0-pgsty.2, pins verified scanner v0.0.5 on DuckDB v2.0.1, and supports direct upgrades from 0.3.0–0.3.2.

pg_mooncake 0.3.3 resolves a snapshot durability bug in CALL mooncake.create_snapshot(...) by upgrading the embedded engine to Moonlink v0.3.0-pgsty.2 and pinning duckdb_mooncake v0.0.5 (verified across Linux and macOS CI).

Take Fresh Snapshots After Upgrading

Prior workers could return from CALL mooncake.create_snapshot(...) before the last source commit had reached Apache Iceberg. After upgrading to 0.3.3 (or 0.3.4), take a fresh snapshot of every mirror before using it as a backup or migration boundary. If an earlier restore differs from the authoritative PostgreSQL source, compare both tables and rebuild the affected mirror as needed.

Component Matrix

Component Version / Tag Revision Notes
pg_mooncake v0.3.3 e39bb19c71 PostgreSQL 15–19 (pgrx 0.20.0, Rust 1.99.1)
moonlink v0.3.0-pgsty.2 bae6634bf6 Waits for published table commits to persist in Iceberg before acknowledging snapshots
duckdb_mooncake v0.0.5 89413ba02d Pinned to Moonlink v0.3.0-pgsty.2; verified standalone SQL regression & Alpine/musl CI
pg_duckdb 1.2.1 451d389a3f Embeds DuckDB v2.0.1 (8d78114e90)

What Changed in 0.3.3

  • Durable create_snapshot acknowledgements: Embeds Moonlink v0.3.0-pgsty.2, which waits for published table commits to reach Iceberg before answering CALL mooncake.create_snapshot(...).
  • Verified scanner v0.0.5: Pins duckdb_mooncake v0.0.5, including its standalone SQLLogicTest regression inside the source release archive and matching CI-built binaries verified on Linux and macOS.
  • Direct SQL upgrades with stale-scanner guard: Adds sql/pg_mooncake--0.3.0--0.3.3.sql, sql/pg_mooncake--0.3.1--0.3.3.sql, and sql/pg_mooncake--0.3.2--0.3.3.sql. The direct update from 0.3.2 preserves all existing mirror registration IDs and generations while rejecting a stale loaded v0.0.4 scanner.

Upgrading

  • From 0.3.1 or 0.3.2:
    1. Install the matching pg_mooncake 0.3.3 libraries and duckdb_mooncake v0.0.5 scanner into the configured mooncake.extension_repository, then restart PostgreSQL.
    2. Refresh the cached DuckDB scanner in each database:
      SELECT duckdb.raw_query(
          format('FORCE INSTALL mooncake FROM %L', current_setting('mooncake.extension_repository'))
      );
    3. Open a fresh session so PostgreSQL loads v0.0.5, then run:
      ALTER EXTENSION pg_mooncake UPDATE TO '0.3.3';
    4. Take a fresh CALL mooncake.create_snapshot(...) on each mirror before relying on it for backup or migration.
  • From WAL-based PGSTY 0.3.0: Stop source writes, verify old snapshots against their sources in both directions, preserve the complete storage backup and old _wal offline before starting the new worker, and follow the per-database upgrade procedure.
Deploying with pg_duckdb 1.2.2?

If you want compatibility with pg_duckdb 1.2.1 and newer (including the 1.2.2 reference build), upgrade directly to pg_mooncake 0.3.4.

Source Release Assets & Checksums

Download pg_mooncake-0.3.3-source.tar.gz and SHA256SUMS and verify with sha256sum -c SHA256SUMS (shasum -a 256 -c SHA256SUMS on macOS). The tarball bundles all pinned Git submodules.

Download asset
FileChecksum
pg_mooncake-0.3.3-source.tar.gz SHA-256 4a96f2a7…4b68
SHA256SUMS SHA-256 ae4ebac2…1186

Validation & Security Audit

  • Reproducible build: Two independent checkouts produced identical source tarballs (4a96f2a7...).
  • End-to-end test runs: Fresh installations on PostgreSQL 18.7 (Debian ARM64) — loading the scanner built by GitHub Actions — and PostgreSQL 19.0 (macOS ARM64) each passed 10 SQL regressions, 3 version guards, 15 integration checks, a negative non-restart check, and 2 post-restart checks. Release-mode Cargo checks also passed against PostgreSQL 15, 16, and 17.
  • Upgrade verification: A PG19 upgrade from 0.3.2 rejected a stale v0.0.4 scanner, succeeded after the documented cache refresh, preserved mirror registration IDs and generations, and maintained exact source/mirror parity across new writes, a forced snapshot, and a server restart.
  • RustSec audit (2026-11-23): Against RustSec 43b5554d9d64ca91c8d0839b7150d4f8ee490cdc, cargo audit found 0 vulnerability advisories across all three complete lockfiles (pg_mooncake, moonlink, and duckdb_mooncake/moonlink_ffi), reporting 5, 3, and 2 unmaintained-dependency notices respectively (matched by strict cargo deny with no ignores).

Table reader