# 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.

---

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

---

**v0\.3\.3 · 2026-11-23**
- [View release](https://github.com/pgsty/pg_mooncake/releases/tag/v0.3.3)
- [Source · tar\.gz](https://github.com/pgsty/pg_mooncake/archive/refs/tags/v0.3.3.tar.gz)
- [Source · zip](https://github.com/pgsty/pg_mooncake/archive/refs/tags/v0.3.3.zip)
- [pgsty\/pg\_mooncake](https://github.com/pgsty/pg_mooncake)

**`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`**](/release/moonlink-0.3.0-pgsty.2/) and pinning [**`duckdb_mooncake v0.0.5`**](/release/duckdb-mooncake-0.0.5/) (verified across Linux and macOS CI).

> [!IMPORTANT] 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`](/release/pg-mooncake-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 {#components}

| 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`](/release/moonlink-0.3.0-pgsty.2/) | `bae6634bf6` | Waits for published table commits to persist in Iceberg before acknowledging snapshots |
| **`duckdb_mooncake`** | [`v0.0.5`](/release/duckdb-mooncake-0.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`) |
{.wide .expand}

## What Changed in `0.3.3` {#changes}

- **Durable `create_snapshot` acknowledgements**: Embeds [`Moonlink v0.3.0-pgsty.2`](/release/moonlink-0.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`](/release/duckdb-mooncake-0.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 {#upgrade}

- **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:
     ```sql
     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:
     ```sql
     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](https://github.com/pgsty/pg_mooncake/blob/v0.3.3/README.md#upgrading-a-pgsty-030-installation).

> [!TIP] 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`](/release/pg-mooncake-0.3.4/).

## Source Release Assets & Checksums {#assets}

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.

```checksums
4a96f2a7023fac2555760ce055537a7203137526528b9f19626ada1964f24b68  pg_mooncake-0.3.3-source.tar.gz
ae4ebac2ff136298837c6d49f2015510c99b729bde8bc1ab42a5ac749da81186  SHA256SUMS
```

## Validation & Security Audit {#validation}

- **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).

---

Backlinks:

- [duckdb_mooncake 0.0.4: Isolated Scan Connections & DuckDB 2.0.1](/release/duckdb-mooncake-0.0.4/)
- [duckdb_mooncake 0.0.5: Durability-Pinned RPC & DuckDB 2.0 CI](/release/duckdb-mooncake-0.0.5/)
- [moonlink 0.3.0: WAL-Free Iceberg Recovery & Hardened CDC](/release/moonlink-0.3.0/)
- [moonlink 0.3.0-pgsty.1: Mirror Generations, Iceberg 0.11 & Security Audit](/release/moonlink-0.3.0-pgsty.1/)
- [moonlink 0.3.0-pgsty.2: Durable Iceberg Snapshot Acknowledgements](/release/moonlink-0.3.0-pgsty.2/)
- [pg_mooncake 0.3.2: PostgreSQL 15–19, Mirror Generations & Iceberg 0.11](/release/pg-mooncake-0.3.2/)
