0

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.

Tom
  • 31
  • 2

1 Answers1

0

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

NatKot
  • 1
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 06 '23 at 09:40