Skip to content

Unable to stop pg_cron scheduler #352

Open
@serpent7776

Description

@serpent7776

I'm unable to stop pg_cron scheduler, even after I drop the extension. I also tried to restart the cluster and whole postgres service, but the scheduler is still running.

This is an issue, because it maintains connection to the database. In the case I install the extension to database other than postgres, it effectively prevents me from dropping/renaming the database.

It happened both with background workers and libpq connection.

I'd expect that dropping the extension should stop the scheduler.

I'm running postgresql-16-cron 1.6.4-1.pgdg22.04+1

postgres=# create extension pg_cron;

postgres=# SELECT pid,datname,application_name FROM pg_stat_activity WHERE datname = 'postgres';
  pid  | datname  | application_name  
-------+----------+-------------------
 23807 | postgres | pg_cron scheduler
 26168 | postgres | psql

postgres=# drop extension pg_cron;

postgres=# SELECT pid,datname,application_name FROM pg_stat_activity WHERE datname = 'postgres';
  pid  | datname  | application_name  
-------+----------+-------------------
 23807 | postgres | pg_cron scheduler
 26168 | postgres | psql

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions