# moonlink 0.3.0-pgsty.2: Durable Iceberg Snapshot Acknowledgements

> PGSTY Moonlink v0.3.0-pgsty.2 fixes early acknowledgements in create_snapshot by waiting for published table commits to reach Apache Iceberg before completing, validated across chaos, unit, and PostgreSQL 19 CDC suites.

---

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

---

**v0\.3\.0\-pgsty\.2 · 2026-11-23**
- [View release](https://github.com/pgsty/moonlink/releases/tag/v0.3.0-pgsty.2)
- [Source · tar\.gz](https://github.com/pgsty/moonlink/archive/refs/tags/v0.3.0-pgsty.2.tar.gz)
- [Source · zip](https://github.com/pgsty/moonlink/archive/refs/tags/v0.3.0-pgsty.2.zip)
- [pgsty\/moonlink](https://github.com/pgsty/moonlink)

**Moonlink `v0.3.0-pgsty.2`** fixes a snapshot durability bug in `create_snapshot` where a forced snapshot could return before the latest source commit was persisted to Apache Iceberg. This release pairs with [`pg_mooncake 0.3.3`](/release/pg-mooncake-0.3.3/), [`pg_mooncake 0.3.4`](/release/pg-mooncake-0.3.4/), and [`duckdb_mooncake v0.0.5`](/release/duckdb-mooncake-0.0.5/).

## What Was Fixed {#fix}

In [`v0.3.0-pgsty.1`](/release/moonlink-0.3.0-pgsty.1/) (and the underlying `v0.3.0` baseline), the replication watermark (`replication_lsn`) could advance past a source transaction while a mirror's `TableHandler` was still processing or flushing an earlier state. When `create_snapshot` checked only the replication watermark, it could acknowledge completion even though Iceberg still held an older snapshot of that table.

In `v0.3.0-pgsty.2` (commits [`bc99ce4d`](https://github.com/pgsty/moonlink/commit/bc99ce4d07fe6af9675cecd7e2c199fe76abd17c) and [`bae6634b`](https://github.com/pgsty/moonlink/commit/bae6634bf691c3153ff41985d823dcedc2bd949b)):

- **Table commit watch on `TableHandler`**: `TableHandler` now tracks the table's published commit watermark (`commit_lsn_rx`) alongside the replication stream watermark (`replication_lsn_rx`).
- **Ordered publication and Iceberg persistence wait**: `create_snapshot` now waits until published table commits up through the requested position have actually been persisted to Iceberg before acknowledging the caller.
- **Release layout regression coverage**: Added CDC regression coverage verifying legacy source fingerprints and occupied Iceberg table locations against the PGSTY release on-disk layout.

## Action Required After Upgrading {#upgrade-action}

> [!IMPORTANT] Take Fresh Snapshots After Upgrading
> After installing the updated worker (`pg_mooncake 0.3.3` or `0.3.4` with `Moonlink v0.3.0-pgsty.2`), take a fresh snapshot (`CALL mooncake.create_snapshot(...)`) of each mirror before relying on it as a backup or migration boundary. If an earlier restore already exhibits missing rows, compare the mirror against its authoritative PostgreSQL source and rebuild the affected mirror as needed.

## Embedded Rust API Note {#rust-api}

Standalone Rust applications constructing a `TableHandler` directly must now supply the table commit watch (`commit_lsn_rx`) alongside the replication watch (`replication_lsn_rx`), as documented in the [tagged README](https://github.com/pgsty/moonlink/blob/v0.3.0-pgsty.2/README.md):

- Publish the table commit position **before** enqueueing the table's commit event.
- Advance the replication position **after** enqueueing the commit event.

All storage stack versions (`Iceberg 0.11.0`, `OpenDAL 0.58.2`, `Arrow`/`Parquet 58.4.2`, `SQLx 0.9.1`, `libsqlite3-sys 0.40.0`) and the zero-vulnerability RustSec audit posture from `v0.3.0-pgsty.1` remain unchanged.

## Validation {#validation}

| Suite | Result |
| :--- | :--- |
| Original failing chaos seed | Passed **3/3** consecutive runs after the fix |
| Local workspace unit suites (`cargo nextest`) | **771/771** tests passed |
| PostgreSQL 19 CDC integration suite | **131/131** tests passed, including real server restarts |
| Linux CI pipeline | [Run #45153482056](https://github.com/pgsty/moonlink/actions/runs/45153482056) covering chaos, object storage, and PostgreSQL integration |
{.wide .expand}

---

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/)
- [pg_mooncake 0.3.3: Durable Snapshot Acknowledgements](/release/pg-mooncake-0.3.3/)
- [pg_mooncake 0.3.4: pg_duckdb 1.2.1+ Support & Direct Upgrades](/release/pg-mooncake-0.3.4/)
