Skip to Main Content
Status Future consideration
Workspace * IBM Cloud Ideas
Categories Databases
Created by Guest
Created on Jul 25, 2024

Add pg_cron extension to PostgreSQL

We have the need for running regular maintenance and auditing jobs against our Postgres infrastructure. For example, in Postgres, we have some applications with large, highly volatile tables. As is typical in Postgres, this can cause autovacuum to not be able to complete for these tables (since it is a non-blocking background process that prioritizes user session locks over completing autovacuum/autoanalyze runs). The result of this for us is tables/indexes with stale statistics and poor performance over time.

Rather than have to manually respond to incidents related to poor performance, we would like to use pg_cron to perform regular, automated checks against stale statistics and prioritize having a "top-N" automated VACUUM ANALYZE run on a regular periodic basis. This is just one very reasonable use case that I'm sure many customers like us would appreciate being able to take advantage of if pg_cron was available. We ourselves could implement some additional auditing based off of internal business cases if pg_cron was available.

Other cloud providers make the pg_cron extension available for doing this. It is a relatively simple extension and low complexity to actually make available, even in a managed Postgres environment.

Idea priority Medium
Needed By Quarter