This patch release fixes worker error reporting and hardens the worker error-exit path. No extension version bump is required — the control file remains at 1.9 and there is no upgrade SQL to run.
Bug Fixes
- Propagate real SQLSTATE from worker to launcher via shm_mq. Previously, the launcher saw a generic SQLSTATE for worker-side errors; the actual code is now forwarded so callers can branch on specific PostgreSQL error codes.
- Switch memory context before
CopyErrorDatain the worker error handler to avoid copying out of a context that is about to be torn down. - Use
QueryCancelPendinginstead ofProcDiePendingin the SIGTERM handler, preventing the worker from crashing on cancel. - Fix PG18-incompatible forward declarations that broke the build on PostgreSQL 18.
- Fix
HOLD_INTERRUPTS/pq_flushordering and stats accounting in the error-exit path so stats stay consistent on failures.
Code Quality
- Extract an error-exit helper and flatten nested
PG_TRYto eliminate-Wshadow=compatible-localwarnings. - NULL-safe SQLSTATE asserts, formatting, and doc cleanups.
- Restore exact stats counts in the final regression assertion.
- Update stale
init-phasewording in worker error-exit comments.
Compatibility
- Supported: PostgreSQL 14, 15, 16, 17, 18.
- Extension version unchanged (
1.9) — noALTER EXTENSION ... UPDATEneeded when upgrading from v1.9, v1.9.1, or v1.9.2.
Upgrade
Rebuild and reinstall the extension binary; no SQL migration is required.
```bash
make clean && make
sudo make install
```
Full Changelog: v1.9.2...v1.9.3