Closed ETisREAL closed 4 months ago
wondering why you are asking questions about pg_cron usage in the Spilo repo:)
maybe this can help in your situation https://github.com/citusdata/pg_cron/issues/48#issuecomment-386207327
@hughcapet I am asking here because I believe there is a misconfiguration in the Spilo image, since I checked the pgconf in the container and it should allow trusted local connections, yet pg_cron somehow fails.
Hi :) hope everything's alright.
I am trying to set up a cron using the pg_cron extension. I have checked an the image has set the pg_hba trust for local connections:
and it is using a unix socket for connecitons:
I am creating a function that the pg_cron should run, which I'll share for reference as well:
and setting up the cron job in the postgresql DB
The function's code is correct, because if I launch the same query manually ('SELECT manage_autoscaling_metrics();') a row gets inserted as expected. However when I check for the status of the cron I get this output:
I really have no idea what I'm doing wrong. As I said, I checked the configurations of the container and everything seems fine. Is it a database issue perhaps? But from what I've read the cron is supposed to run in the postgres DB isn't it?
If you need any more context I'll gladly provide it.
Thanks in advance