Our team is proud to introduce a new pg_timetable v5.3 release!
Table of Contents
This time we focused solely on implementing new features for logging.
I want to remind you that pg_timetable is a community project. So, please, don’t hesitate to ask any questions, to report bugs, to star the pg_timetable project, and to tell the world about it.
The first new cool feature we've added to pg_timetable v5.3 release is the opportunity to disable sending logs to the timetable.log
table.
We knew pg_timetable used a lot in high-load environments but never met the workloads where chains scheduled to fire every (sic!) second! It turns out such a workload can easily produce 10Gb of WALs in a day! One possible solution would be to change the timetable.log
definition to UNLOGGED
, e.g.
1 |
ALTER TABLE timetable.log SET UNLOGGED; |
Of course, you should also monitor table bloat and truncate it effectively.
Another approach is to output session logs to the local file only, while at the same time disabling database logging. Precisely in order to achieve this, we've added a new --log-database-level=none
command line and configuration option. It will altogether disable the session logging. However, the execution logging (tasks output and return codes) is still active and cannot be disabled. If you are experiencing bloating because of tasks output, I recommend piping the output to the /dev/null
or a local file. This situation applies only to PROGRAM
tasks since BUILT-IN
and SQL
tasks are not wordy.
Previously we had only two options to control file logging:
1 2 |
--log-file= File name to store logs --log-file-format=[json|text] Format of file logs (default: json) |
🔔 To enable file logging, you must specify the --log-file
parameter! Otherwise, only database logging is on.
In this release, we added four more:
1 2 3 4 |
--log-file-rotate Rotate log files --log-file-size= Maximum size in MB of the log file before it gets rotated (default: 100) --log-file-age= Number of days to retain old log files, 0 means forever (default: 0) --log-file-number= Maximum number of old log files to retain, 0 to retain all (default: 0) |
They are pretty straightforward, but let me stress some notes:
--log-file-rotate
to enable log rotation. Otherwise, pg_timetable will ignore all other configurations.--log-file-size
at maximum. The current file will always have the --log-file
name, while the rotated one will always contain a timestamp in its name. Rule of thumb: only rotated (old) log files contain timestamps in the name.--log-file-age
days of retention.--log-file-number=10
option.The full changelog is available on the v5.3 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!
In order to receive regular updates on important changes in PostgreSQL, subscribe to our newsletter, or follow us on Twitter, Facebook, or LinkedIn.
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