how can I see the Pg_cron logs in the PostgreSQL log

2023-12-28T12:07:24.7+00:00

We enabled the logs in the Azure portal, how can I see the Pg_cron logs, the outcome of jobs, in the PostgreSQL log. Just FYI., below server parameters are set to ON:

cron.log_run=ON
cron.log_statement=ON

Azure Database for PostgreSQL
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Oury Ba-MSFT 20,911 Reputation points Microsoft Employee Moderator
    2023-12-28T21:43:26.14+00:00

    @Naveen Kumar Kakarla (Quadrant Resource) Thank you for reaching out.

    My understanding is that you are trying to view PG_cron logs for your Azure Database PostgreSQL.

    You can now also see a log of your pg_cron jobs in the database in a table called  cron.job_run_details.

     The cron.job_run_details table shows:

    • when a command started and finished,
    • whether the pg_cron command succeeded, and
    • the number of rows returned—or the error message to quickly detect when something went wrong.

    Please do check the blog for more details Evolving pg_cron together: Postgres 13, audit log, background workers, & job names

    Please do let me know if you run into any issues.

    Regards,

    Oury


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.