Top
Enterprise Postgres 17 SP1 Installation and Setup Guide for Server

4.7.14 pg_cron

4.7.14.1 Setting Up pg_cron

  1. Set the postgresql.conf file parameter.
    Add "pg_cron " to the "shared_preload_libraries" parameter.
    When using streaming replication, the primary and standby servers must be on the same port number. If you cannot set the same port number, you will need to enable background workers in pg_cron.
    Specify "on" to the cron.use_background_workers parameter.
    Increase the max_worker_processes parameter as needed. In addition to one resident process of pg_cron, max_worker_processes must be increased depending on the number of concurrently running jobs.

  2. As superuser, run the following command:

    $ su -
    Password:******
    # cp -r /opt/fsepv<x>server64/OSS/pg_cron /* /opt/fsepv<x>server64
  3. Restart Fujitsu Enterprise Postgres.

  4. Run CREATE EXTENSION for the database that will use this feature.
    The target database is described as "postgres" here.
    Use the psql command to connect to the "postgres" database.

    postgres=# CREATE EXTENSION pg_cron;
    CREATE EXTENSION

4.7.14.2 Removing pg_cron

  1. Execute DROP EXTENSION for the database that will use this feature.
    Use the psql command to connect to the "postgres" database.

    postgres=# DROP EXTENSION pg_cron CASCADE;
    DROP EXTENSION
  2. As superuser, run the following command:

    $ su -
    Password:******
    # rm -rf /opt/fsepv<x>server64/filesCopiedDuringSetup

    Information

    The files copied during setup can be checked below.

    # find /opt/fsepv<x>server64/OSS/pg_cron
  3. Set the postgresql.conf file parameters.
    Delete "pg_cron" to the shared_preload_libraries parameter.
    Specify "off" to the cron.use_background_workers parameter.
    Returns the value of the max_worker_processes parameter.

  4. Restart Fujitsu Enterprise Postgres.