Open ember11498 opened 7 months ago
im working on the same problem
Me too.
Please check if your shared_preload_libraries = 'pg_cron'
in your pg_cron.conf
is created correctly. I did run into the same error because of a mistake in my Dockerfile where it didn't append to the postgresql.conf
correctly and therefore the postgres couldn't load the extension
I fixed this via docker-compose.yaml
:
db:
container_name: postgres
build:
dockerfile: Dockerfile
restart: always
ports:
- "5432:5432"
volumes:
- postgresdata01:/var/lib/postgresql/data
command:
[
"postgres",
"-c",
"log_statement=all",
"-c",
"log_destination=stderr",
"-c",
"shared_preload_libraries=pg_cron",
"-c",
"cron.database_name=<DB_NAME>",
]
I know this is a very common error when installing pg_cron but I cannot make it work even after reading.
i get this error when i run "CREATE EXTENSION pg_cron;"
ERROR: unrecognized configuration parameter "cron.database_name" CONTEXT: PL/pgSQL function inline_code_block line 3 at IF
SQL state: 42704
my Dockerfile looks like this (i created an image of postgres with postgis, pgvector and cron all extensions work bu cron).
` FROM postgres:15
`