Overview
PGQueuer v0.19.0 introduces significant changes aimed at enhancing performance and improving logging. This release includes breaking changes, so please review the notes carefully to ensure a smooth upgrade.
Breaking Changes
1. **Unified Status Enum**
The `queue_status_type` and `statistics_table_status_type` enums have been consolidated into a single unified enum. This simplifies status management across the system.
[[PR 294](https://github.com/janbjorge/pgqueuer/pull/294)](https://github.com/janbjorge/pgqueuer/pull/294)
2. **Enhanced Job Logging with `queue_table_log`**
A new `queue_table_log` has been introduced to improve job logging and performance. This change affects how job statuses are recorded and reported. The new logging mechanism delivers an approximate 2.5x performance boost.
[[PR 287](https://github.com/janbjorge/pgqueuer/pull/287)](https://github.com/janbjorge/pgqueuer/pull/287)
3. **Durability Policy Introduction**
A new durability policy mechanism has been added, allowing explicit configuration of table logging modes. This feature provides greater control over performance and data durability.
[[PR 301](https://github.com/janbjorge/pgqueuer/pull/301)](https://github.com/janbjorge/pgqueuer/pull/301)
New Features
1. **Durability Policy Configuration**
Introduced explicit logging modes through a new durability policy, enabling users to choose between `volatile`, `balanced`, and `durable` configurations for table logging.
- **Volatile:** All tables are unlogged, offering maximum performance at the cost of durability. Suitable for temporary or ephemeral data where data loss is acceptable.
- **Balanced:** The main queue and schedules tables are logged for durability, while auxiliary tables like logs and statistics are unlogged for better performance.
- **Durable:** All tables are fully logged to ensure maximum data integrity and durability, ideal for production environments where data loss is unacceptable.
[[PR 301](https://github.com/janbjorge/pgqueuer/pull/301)](https://github.com/janbjorge/pgqueuer/pull/301)
2. **Updated CLI with New Commands**
The CLI has been enhanced with new commands and improved documentation. The `queue` command now has better support and clearer documentation.
[[PR 302](https://github.com/janbjorge/pgqueuer/pull/302)](https://github.com/janbjorge/pgqueuer/pull/302)
Migration Guide
To upgrade to v0.19.0, follow these steps:
1. **Update Enums:**
- Replace references to `queue_status_type` and `statistics_table_status_type` with the new unified status enum.
2. **Apply Schema Changes:**
- Run the `pgq upgrade` command to apply the new schema changes, including the creation of `queue_table_log`.
3. **Configure Durability Policy:**
- Review and set the appropriate durability policy using the new CLI options to balance performance and data durability according to your needs.
Full Changelog
For a detailed list of all changes, refer to the [[full changelog](https://github.com/janbjorge/pgqueuer/compare/v0.18.10...v0.19.0)](https://github.com/janbjorge/pgqueuer/compare/v0.18.10...v0.19.0).
---
Its recommend thorough testing before deploying v0.19.0 to production environments due to the breaking changes included in this release. For any issues, please report them on [[GitHub Issues](https://github.com/janbjorge/pgqueuer/issues)](https://github.com/janbjorge/pgqueuer/issues).
**Full Changelog**: https://github.com/janbjorge/pgqueuer/compare/v0.18.10...v0.19.0