Task Scheduler
When operating PostgreSQL installations, you need to periodically perform certain tasks, such as:
database backup — creating a backup copy of the PostgreSQL database to preserve data in case of loss or damage;
maintenance tasks related to the database management system, for example:
vacuum — clearing outdated or deleted rows from the table and freeing space in the database;
analyze — analyzing data in tables to improve query performance;
DDL operation (Data Definition Language) — operations to change the structure of the database, such as creating or deleting table partitions, for example: commands “CREATE”, “ALTER” and “DROP”;
DML operation (Data Manipulation Language) — operations to add, delete, and modify data in tables, for example: commands “INSERT”, “UPDATE” and “DELETE”;
running custom scripts to perform certain tasks:
Bash: scripts in the Linux command shell language used to automate certain tasks;
Python/Golang: programs in the Python or Golang programming languages that can perform various tasks related to managing PostgreSQL databases or other aspects of the system.
This section describes the Scheduler tool, which allows you to define the frequency of executing the actions described above and organize it.