pg_mooncake 0.3.4 accepts pg_duckdb 1.2.1 and later (reference build 1.2.2 on DuckDB v2.0.1), pins PGXS module versions in source archives, provides direct SQL upgrades from 0.3.0–0.3.3, and documents durable 0.3.0 WAL retirement.
pg_mooncake 0.3.4 removes the rigid exact-version lock on pg_duckdb, accepting pg_duckdb 1.2.1 and later on installation and upgrade while advancing the reference build to pg_duckdb 1.2.2 (embedding DuckDB v2.0.1). It continues to bundle Moonlink v0.3.0-pgsty.2 and duckdb_mooncake v0.0.5, provides direct SQL upgrades from all prior PGSTY 0.3.x releases (0.3.0 through 0.3.3), and has been validated end-to-end across PostgreSQL 15 through 19.
Component Matrix
Component
Version / Tag
Revision
Notes
pg_mooncake
v0.3.4
479f8ec8c2
PostgreSQL 15–19 (pgrx 0.20.0, Rust 1.99.1)
pg_duckdb
>= 1.2.1 (ref 1.2.2)
4e921ffbe4
Lower-bound SemVer check; reference 1.2.2 and 1.2.1 both embed DuckDB v2.0.1
Replaces the exact pg_duckdb = 1.2.1 guard with semantic-version lower-bound enforcement (handling numeric major.minor.patch and prerelease precedence) across installation and upgrade SQL scripts. Both tested pg_duckdb1.2.1 and 1.2.2 embed DuckDB v2.0.1 and share bundled scanner v0.0.5. Operators choosing a newer pg_duckdb with a different DuckDB engine must verify its PostgreSQL interfaces and supply scanner v0.0.5 built for that engine and platform.
Pinned PGXS module version
Adds scripts/pg_duckdb.mk and overrides CPPFLAGS with -DPG_DUCKDB_VERSION from versions.json, rebuilding src/pgduckdb.o whenever pins change so source builds emit the pinned pg_duckdb module version consistently in both Git checkouts and unpacked source archives.
Direct SQL upgrades (0.3.0–0.3.3)
Ships direct SQL upgrade scripts 0.3.0--0.3.4, 0.3.1--0.3.4, 0.3.2--0.3.4, and 0.3.3--0.3.4. Existing 0.3.2 and 0.3.3 mirror registrations and generations are preserved while enforcing pg_duckdb >= 1.2.1 and loaded scanner v0.0.5.
Durable 0.3.0 WAL retirement guide
Documents how to emit a transactional logical WAL marker and take a verified Iceberg snapshot (flush_lsn) before retiring the legacy 0.3.0 worker’s private _wal directory offline.
Upgrading to 0.3.4
From 0.3.1, 0.3.2, or 0.3.3
Install the pg_mooncake 0.3.4 libraries, compatible pg_duckdb (>= 1.2.1, reference 1.2.2), and scanner v0.0.5 into your local mooncake.extension_repository, then restart PostgreSQL.
If upgrading from 0.3.1 or 0.3.2, refresh the cached DuckDB scanner before updating the extension, then open a fresh session so the backend loads v0.0.5:
SELECTduckdb.raw_query(format('FORCE INSTALL mooncake FROM %L',current_setting('mooncake.extension_repository')));
In each database with pg_mooncake installed, update pg_duckdb (if its installed library changed) and update pg_mooncake:
If upgrading from 0.3.1 or 0.3.2, run a fresh CALL mooncake.create_snapshot(...) on every mirror before using it as a backup or migration boundary.
From WAL-Based PGSTY 0.3.0
PGSTY 0.3.0 used Moonlink v0.0.1 (b298ef74), which could acknowledge source changes into its private _wal before Iceberg persistence. Perform these steps on every database with mirrors before switching binaries:
Stop writers to every source table (including remote sources) and take a recoverable backup of both PostgreSQL and the complete Moonlink directory.
On the old 0.3.0 binaries, wait until each mirror matches its quiescent source (comparing all columns in both directions with EXCEPT ALL) and record each mirror’s commit_lsn from mooncake.list_tables(). For a source on the same PostgreSQL cluster, run both statements in the same autocommit session so create_snapshot receives a commit LSN after the last source write:
Recheck mooncake.list_tables() and proceed only once flush_lsn covers the recorded source change (including a delete that emptied a mirror).
Stop PostgreSQL cleanly, move the old _wal directory outside the active Moonlink data directory and keep it with your backup (the new worker refuses to start if a nonempty _wal remains).
Install the matched pg_mooncake 0.3.4, pg_duckdb, and scanner v0.0.5, start PostgreSQL, and run ALTER EXTENSION pg_duckdb UPDATE TO '1.2.2'; (if upgraded) followed by ALTER EXTENSION pg_mooncake UPDATE TO '0.3.4'; in a fresh session.
Re-verify source/mirror parity, commit one identifiable test change, verify it in the mirror, and take a fresh snapshot before resuming writers. See the full upgrade guide for remote-source details.
Source Release Assets & Checksums
The attached pg_mooncake-0.3.4-source.tar.gz bundles all pinned Git submodules. Verify with sha256sum -c SHA256SUMS (shasum -a 256 -c SHA256SUMS on macOS). See changes since v0.3.3 for the exact commit diff.
Tested with both pg_duckdb 1.2.1 and pg_duckdb 1.2.2. With 1.2.2, every PostgreSQL major (15–19) passed all 10pg_regress SQL suites and full integration checks across real server restarts.
macOS ARM64 · PostgreSQL 19
Passed full SQL regression suites and post-restart integration checks.
Upgrade matrix
Direct SQL upgrades from all four previous PGSTY versions (0.3.0, 0.3.1, 0.3.2, 0.3.3) exercised end-to-end with existing mirror data.