pg_cron Extension Fails to Load in VMware Tanzu for Postgres due to Operator Restriction on shared_preload_libraries
search cancel

pg_cron Extension Fails to Load in VMware Tanzu for Postgres due to Operator Restriction on shared_preload_libraries

book

Article ID: 417149

calendar_today

Updated On:

Products

VMware Tanzu Data Services Solutions VMware Tanzu for Postgres VMware Tanzu Greenplum VMware Tanzu Greenplum / Gemfire

Issue/Introduction

When attempting to create the pg_cron extension in VMware Tanzu for Postgres 3.0 (PostgreSQL 15.7), the operation fails with the following error:

ERROR:  unrecognized configuration parameter "cron.database_name"
CONTEXT:  PL/pgSQL function inline_code_block line 3 at IF

Environment

VMware Tanzu for Postgres 3.0

PostgreSQL 15.7

Cause

- The Tanzu Postgres 3.0 Operator fully manages PostgreSQL configuration and does not expose shared_preload_libraries for user customization.

- The pg_cron extension requires its library to be loaded at startup

shared_preload_libraries = 'pg_cron'

- Without this preload, the cron.* GUC parameters (like cron.database_name) are unrecognized, causing the CREATE EXTENSION command to fail.

Resolution

- Consider to use an External Scheduler like CronJob.