Schedule - PGDay/MED 2023

Professional PostgreSQL scheduling made easy

Date: 2023-04-13
Time: 15:10–16:00
Room: Amphitheatre

The talk firstly introduces all appropriate levels of database scheduling regardless of the vendor: * Built-in Schedulers * System Schedulers * and then focuses on PostgreSQL and the means it provides.

Then we will throw some light onto the meaning and importance of critical approaches: * SQL (database) level tasks * shell (system) level tasks * predefined tasks (depending on a scheduler)

of course, I will describe different conceptions of scheduled tasks: * usual cron syntax, e.g., “At 00:05 in August.” [5 0 * 8 *] * non-standard cron by event, e.g., system reboot [@reboot] * interval syntax, e.g. [@every 1h 15m], [@after 0h 15m] * signaled tasks, when a user or a monitoring system gives an order for execution

Postgres community has already developed several tools in that area. Some popular common options will be highlighted together with the problems that different scheduling approaches have: * pgAgent * jpgAgent * pg_cron * pgBucket (runseven) * pgAutomator (discontinued?)

We will discuss the two different architecture approaches for a PostgreSQL database scheduler: * built-in aka server background worker * external aka client worker

To overcome some of these problems, a new Open Source tool from Cybertec developed by me, called pg_timetable, is introduced and explained in detail.

It offers the simplest possibly entry into exhaustive Postgres scheduling combined with system tasks (cron on steroids). Also will be discussed advanced topics like transaction support, cross-cluster tasks, and cross-platform tasks.


Pavlo Golub