Skip to content

PgQue 0.3.0-rc.2

Pre-release
Pre-release

Choose a tag to compare

@NikolayS NikolayS released this 21 Nov 16:46
· 6 commits to main since this release
f4c7457

Pre-release (v0.3.0-rc.2) — Release candidate for PgQue 0.3.0. Not the final 0.3.0 release.

  • Frozen stable sql/ remains 0.2.2. The 0.3.0-rc.2 SQL installers live under devel/sql/ (and are attached below for convenience):
    • devel/sql/pgque.sql (80a116aab020685a09234721bf17b7d0deff5b33891874c9f69984627ff3d48d)
    • devel/sql/pgque-tle.sql (ffabcd92977f3d41d0198c3a7ddcf993ef35900dacfcb3dc620e5c614686f866)
    • devel/sql/pgque_uninstall.sql (36cb7b4ba6be1924fdf7bfd72ec4c66d2664ef549081dda821bb3b12d1355572)
    • devel/sql/pgque-tle-uninstall.sql (ca5f08e87c2613389a5836d4054b5e68d362106b871e3a70a03fce2ea6c2a0c1)
  • Coordinated client candidate versions:
    • Python (pgque-py): 0.3.0rc2
    • TypeScript (pgque): 0.3.0-rc.2 (npm dist-tag rc, never latest)
    • Ruby (pgque): 0.3.0.rc.2
    • Go (github.com/NikolayS/pgque-go): v0.3.0-rc.2
  • Consolidated PR: #395

Highlights in 0.3.0-rc.2

PostgreSQL 19.0 GA support

  • Full CI and release qualification across PostgreSQL 14, 15, 16, 17, 18, and 19.0 GA (official postgres:19 + postgresql-19-cron), plus pg_tle on PostgreSQL 18 and real pg_timetable worker validation on PostgreSQL 19.
  • Added tests/test_pgcron_delivery.sql proving real pg_cron-scheduled delivery and ack without manual ticker() calls.

Core 0.3 queue protocol

  • Durable bounded paged batch consumption (receive_page, receive_page_coop, receive_page_partitioned, ack_page, renew_page): bounded page reads without advancing progress until atomic checkpoint ack, takeover-safe lease fencing, latest-ack receipt replay, atomic per-message retry/DLQ routing, legacy whole-batch bypass guards, and independent page adapters across all four SDKs.
  • Producer idempotency (send_idem): queue-scoped deduplication with wall-clock TTL (measured after transaction/row-lock waits), finite TTL validation, and maintenance cleanup.
  • Partition keys & leased slot consumers: atomic slot topology setup/teardown, non-blocking claim_slot under concurrent lease DML, lease release fencing while batches are open, stabilized 0.3 named SQL arguments, and non-superuser partition install ownership verification.
  • Registration & upgrade safety: prevents partition-slot deadlocks and first-registration races, preserves legacy #-containing consumer names across upgrades, and adds data-preserving pg_tle updates from 0.2.1 and 0.2.2 to 0.3.0-rc.2 (ALTER EXTENSION pgque UPDATE TO '0.3.0-rc.2'). Plain SQL upgrades tested from v0.1.0, v0.2.0, v0.2.1, v0.2.2, and v0.3.0-alpha.1 on PG 14 and PG 19.

Client SDKs, security & release tooling

  • Cross-SDK nullable message contracts: Python, TypeScript, and Ruby preserve SQL NULL event type/payload values; Go preserves NULL-to-empty-string compatibility with explicit unknown-type handling.
  • Ruby client hardening: removes unused Event#extra and rejects unknown keywords (ArgumentError), maps missing-consumer SQL errors to ConsumerNotFound, recovers Consumer connections and LISTEN after transient disconnects, and adds exact-tested-gem release verification (ruby/vVERSION tags).
  • Python client: runtime __version__ now derives authoritatively from installed distribution metadata.
  • Security & dependency updates: Go minimum bumped to Go 1.25 with pgx 5.9.2 / golang.org/x/text 0.39.0 (unused x/crypto removed), Python test/build minimums raised, TypeScript dev tooling updated (vitest 4.1.12, vite 6.4.6 — 0 vulnerabilities under bun audit and bun audit --prod).
  • Atomic stable release promotion tooling: adds build/promote-release.sh, build/verify-release-artifacts.sh, build/read-version.sh, RELEASE.md, and sql/release-manifest.txt (verifying frozen 0.2.2 artifacts).
  • Docs & website: adds producer idempotency and partition-key guides plus automated development-vs-stable documentation channel enforcement.

Upgrade & compatibility notes

  • Plain SQL upgrade from 0.1.0 / 0.2.x / 0.3.0-alpha.1: apply devel/sql/pgque.sql in a single transaction (psql --single-transaction -v ON_ERROR_STOP=1 -f devel/sql/pgque.sql).
  • pg_tle upgrade from 0.2.1 or 0.2.2: load devel/sql/pgque-tle.sql, then run alter extension pgque update to '0.3.0-rc.2';. Databases on 0.2.0 must upgrade to 0.2.1/0.2.2 first; unsupported versions fail atomically without modifying installed state.
  • Ruby breaking change from 0.3.0.rc.1: remove any extra: arguments or Event#extra calls.
  • Go breaking toolchain bump: requires Go 1.25+.