We're excited to unveil pg_timetable v5.6, a significant release that takes your PostgreSQL job scheduling to a new level. In this release, we've introduced several key enhancements and features that empower you to manage and automate your database tasks precisely and flexibly.
Table of Contents
One of the standout features in pg_timetable v5.6 is the addition of the chain delay start functionality. Now, you can asynchronously initiate chains of tasks with a time delay:
1 2 3 4 |
SELECT timetable.notify_chain_start( chain_id => 42, worker_name => 'vacuumer', start_delay => '1 hour'::interval) |
The code above means to send the "vacuumer" worker command to start the chain with ID=42
in 1 hour from this moment.
The most obvious situation when you want to use this functionality is the following. Imagine you have a high load on the system at the moment. And you have scheduled soon or even running jobs already. To manage resources efficiently by giving the system some breathing room, you can cancel some chains right now and execute them later. Just notify a worker about a delayed start without applying any changes to job settings.
Another game-changing addition is the enhanced chain error handling. From now you can execute any arbitrary SQL command if the chain fails. Either you want to write a log entry about failure or restart the whole process; it's up to you now!
1 2 3 4 5 6 7 8 9 10 11 12 |
SELECT timetable.add_job( job_name => 'fail', job_schedule => '* * * * *', job_command => 'SELECT 42/0', job_kind => 'SQL'::timetable.command_kind, job_live => TRUE, job_ignore_errors => FALSE, job_on_error => $$SELECT pg_notify('monitoring', format('{'ChainID': %s, 'Executor': %s, 'Message': 'Something bad happened'}', current_setting('pg_timetable.current_chain_id')::bigint, current_setting('pg_timetable.current_client_name')::text))$$ ) |
But that's not all! In pg_timetable v5.6, we've included a range of other improvements and updates to enhance your experience:
The full changelog is available on the v5.6 release page. We want to thank all contributors and users for their help.
If you want to contribute to pg_timetable and help to make it better:
In conclusion, I wish you all the best! ♥️
Please, stay safe – so we can meet in person at one of the conferences, meetups, or training sessions!
You need to load content from reCAPTCHA to submit the form. Please note that doing so will share data with third-party providers.
More InformationYou are currently viewing a placeholder content from Facebook. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More InformationYou are currently viewing a placeholder content from X. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More Information
Leave a Reply