Can't create extension pg_cron in bitnami:postgres docker container?

978 Views Asked by At

I am running a docker container with a Database which is working with the bitnami:postgres image. It is all working fine but now I want to install pg_cron to schedule autmatic jobs.

I installed it and it is available as a possible extension in Dbeaver. But when I select and install it I get the message:

ERROR: extension "pg_cron" must be installed in schema "pg_catalog"

When i am using the command

Create Extension pg_cron;

I get:

ERROR: pg_cron can only be loaded via shared_preload_libraries Hinweis: Add pg_cron to the shared_preload_libraries configuration variable in postgresql.conf.

I tried to change the postgresql.conf file but when I restart my docker container to apply the changes shared_preload_libraries is always reset to pgaudit.

1

There are 1 best solutions below

1
On

Try RUN echo "shared_preload_libraries='pg_cron'" >> /usr/share/postgresql/postgresql.conf.sample in dockerfile