Our team is proud to introduce a new pg_timetable v5.3 release!

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.

pg_timetable new feature – disable database logging

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.


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.

pg_timetable new feature – implement log rotation

Previously we had only two options to control file logging:

      --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:

      --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:

  1. You need to pass --log-file-rotate to enable log rotation. Otherwise, pg_timetable will ignore all other configurations.
  2. Every log file produced will be the size of --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.
  3. You can store log files forever. That’s the default. Or you can clean old log files after --log-file-age days of retention.
  4. The same as above but applied to the number of files to retain. For example, if you only want the last ten log files, start pg_timetable with --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.