Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pg_cron for openSUSE:Factory checked in at 2026-05-06 19:19:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pg_cron (Old) and /work/SRC/openSUSE:Factory/.pg_cron.new.30200 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pg_cron" Wed May 6 19:19:35 2026 rev:15 rq:1351150 version:1.6.7 Changes: -------- --- /work/SRC/openSUSE:Factory/pg_cron/pg_cron.changes 2025-02-14 19:23:24.124915483 +0100 +++ /work/SRC/openSUSE:Factory/.pg_cron.new.30200/pg_cron.changes 2026-05-06 19:23:37.955277821 +0200 @@ -1,0 +2,17 @@ +Wed May 6 09:28:14 UTC 2026 - Reinhard Max <[email protected]> + +- Disable pg13 + +------------------------------------------------------------------- +Thu Sep 25 16:22:44 UTC 2025 - Marcus Rueckert <[email protected]> + +- enable pg 18 + +------------------------------------------------------------------- +Thu Sep 4 12:52:18 UTC 2025 - Marcus Rueckert <[email protected]> + +- update to 1.6.7 + https://github.com/citusdata/pg_cron/releases/tag/v1.6.6 + https://github.com/citusdata/pg_cron/releases/tag/v1.6.7 + +------------------------------------------------------------------- Old: ---- pg_cron-1.6.5.tar.gz New: ---- pg_cron-1.6.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pg_cron.spec ++++++ --- /var/tmp/diff_new_pack.CVBUBR/_old 2026-05-06 19:23:38.651306534 +0200 +++ /var/tmp/diff_new_pack.CVBUBR/_new 2026-05-06 19:23:38.651306534 +0200 @@ -1,7 +1,7 @@ # # spec file for package pg_cron # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,7 +21,7 @@ %{pg_version_from_name} Name: %{pg_name}-%{ext_name} -Version: 1.6.5 +Version: 1.6.7 Release: 0 Summary: PostgreSQL module for simple job schedule License: PostgreSQL ++++++ _multibuild ++++++ --- /var/tmp/diff_new_pack.CVBUBR/_old 2026-05-06 19:23:38.683307854 +0200 +++ /var/tmp/diff_new_pack.CVBUBR/_new 2026-05-06 19:23:38.691308184 +0200 @@ -1,8 +1,8 @@ <multibuild> - <package>postgresql13</package> <package>postgresql14</package> <package>postgresql15</package> <package>postgresql16</package> <package>postgresql17</package> + <package>postgresql18</package> </multibuild> ++++++ pg_cron-1.6.5.tar.gz -> pg_cron-1.6.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pg_cron-1.6.5/README.md new/pg_cron-1.6.7/README.md --- old/pg_cron-1.6.5/README.md 2024-12-12 12:47:30.000000000 +0100 +++ new/pg_cron-1.6.7/README.md 2025-09-04 12:17:08.000000000 +0200 @@ -192,6 +192,41 @@ If you do not want to use `cron.job_run_details` at all, then you can add `cron.log_run = off` to `postgresql.conf`. +## Extension settings + +The pg_cron extension supports the following configuration parameters: + +| Setting | Default | Description | +| ---------------------------------| ----------- | ---------------------------------------------------------------------------------------- | +| `cron.database_name` | `postgres` | Database in which the pg_cron background worker should run. | +| `cron.enable_superuser_jobs` | `on` | Allow jobs to be scheduled as superusers. | +| `cron.host` | `localhost` | Hostname to connect to postgres. | +| `cron.launch_active_jobs` | `on` | When off, disables all active jobs without requiring a server restart | +| `cron.log_min_messages` | `WARNING` | log_min_messages for the launcher bgworker. | +| `cron.log_run` | `on` | Log all run details in the`cron.job_run_details` table. | +| `cron.log_statement` | `on` | Log all cron statements prior to execution. | +| `cron.max_running_jobs` | `32` | Maximum number of jobs that can be running at the same time. | +| `cron.timezone` | `GMT` | Timezone in which the pg_cron background worker should run. | +| `cron.use_background_workers` | `off` | Use background workers instead of client connections. | + +### Changing settings + +To view setting configurations, run: + +```sql +SELECT * FROM pg_settings WHERE name LIKE 'cron.%'; +``` + +Setting can be changed in the postgresql.conf file or with the below command: + +```sql +ALTER SYSTEM SET cron.<parameter> TO '<value>'; +``` + +`cron.log_min_messages` and `cron.launch_active_jobs` have a [setting context](https://www.postgresql.org/docs/current/view-pg-settings.html#VIEW-PG-SETTINGS) of `sighup`. They can be finalized by executing `SELECT pg_reload_conf();`. + +All the other settings have a postmaster context and only take effect after a server restart. + ## Example use cases Articles showing possible ways of using pg_cron: @@ -218,6 +253,7 @@ | [Google Cloud](https://cloud.google.com/sql/postgresql/) | :heavy_check_mark: | | [Heroku](https://elements.heroku.com/addons/heroku-postgresql) | :x: | | [Instaclustr](https://instaclustr.com) | :heavy_check_mark: | +| [Neon](https://neon.tech/docs/extensions/extensions-intro#tooling-admin) | :heavy_check_mark: | | [ScaleGrid](https://scalegrid.io/postgresql.html) | :heavy_check_mark: | | [Scaleway](https://www.scaleway.com/en/database/) | :heavy_check_mark: | | [Supabase](https://supabase.io/docs/guides/database) | :heavy_check_mark: | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pg_cron-1.6.5/include/cron.h new/pg_cron-1.6.7/include/cron.h --- old/pg_cron-1.6.5/include/cron.h 2024-12-12 12:47:30.000000000 +0100 +++ new/pg_cron-1.6.7/include/cron.h 2025-09-04 12:17:08.000000000 +0200 @@ -234,64 +234,6 @@ * extern them elsewhere. */ -#ifdef MAIN_PROGRAM -# if !defined(LINT) && !defined(lint) -char *copyright[] = { - "@(#) Copyright 1988,1989,1990,1993,1994 by Paul Vixie", - "@(#) All rights reserved" - }; -# endif - -char *MonthNames[] = { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", - NULL - }; - -char *DowNames[] = { - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", - NULL - }; - -char *ecodes[] = { - "no error", - "bad minute", - "bad hour", - "bad day-of-month", - "bad month", - "bad day-of-week", - "bad command", - "bad time specifier", - "bad username", - "command too long", - NULL - }; - - -char *ProgramName; -int LineNumber; -time_t StartTime; -time_min virtualTime; -time_min clockTime; - -# if DEBUGGING -int DebugFlags; -char *DebugFlagNames[] = { /* sync with #defines */ - "ext", "sch", "proc", "pars", "load", "misc", "test", "bit", - NULL /* NULL must be last element */ - }; -# endif /* DEBUGGING */ -#else /*MAIN_PROGRAM*/ -extern char *copyright[], - *MonthNames[], - *DowNames[], - *ProgramName; +extern char *MonthNames[]; +extern char *DowNames[]; extern int LineNumber; -extern time_t StartTime; -extern time_min virtualTime; -extern time_min clockTime; -# if DEBUGGING -extern int DebugFlags; -extern char *DebugFlagNames[]; -# endif /* DEBUGGING */ -#endif /*MAIN_PROGRAM*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pg_cron-1.6.5/src/entry.c new/pg_cron-1.6.7/src/entry.c --- old/pg_cron-1.6.5/src/entry.c 2024-12-12 12:47:30.000000000 +0100 +++ new/pg_cron-1.6.7/src/entry.c 2025-09-04 12:17:08.000000000 +0200 @@ -30,6 +30,25 @@ #include "cron.h" +char *MonthNames[] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", + NULL + }; + +char *DowNames[] = { + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", + NULL + }; + +# if DEBUGGING +int DebugFlags; +char *DebugFlagNames[] = { /* sync with #defines */ + "ext", "sch", "proc", "pars", "load", "misc", "test", "bit", + NULL /* NULL must be last element */ + }; +# endif /* DEBUGGING */ + typedef enum ecode { e_none, e_minute, e_hour, e_dom, e_month, e_dow, e_cmd, e_timespec, e_username, e_cmd_len diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pg_cron-1.6.5/src/misc.c new/pg_cron-1.6.7/src/misc.c --- old/pg_cron-1.6.5/src/misc.c 2024-12-12 12:47:30.000000000 +0100 +++ new/pg_cron-1.6.7/src/misc.c 2025-09-04 12:17:08.000000000 +0200 @@ -29,6 +29,8 @@ #include <string.h> #include "cron.h" +int LineNumber; + /* get_char(file) : like getc() but increment LineNumber on newlines */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pg_cron-1.6.5/src/pg_cron.c new/pg_cron-1.6.7/src/pg_cron.c --- old/pg_cron-1.6.5/src/pg_cron.c 2024-12-12 12:47:30.000000000 +0100 +++ new/pg_cron-1.6.7/src/pg_cron.c 2025-09-04 12:17:08.000000000 +0200 @@ -120,7 +120,7 @@ /* forward declarations */ void _PG_init(void); void _PG_fini(void); -static void pg_cron_sigterm(SIGNAL_ARGS); +static void pg_cron_sigterm(SIGNAL_ARGS); static void pg_cron_sighup(SIGNAL_ARGS); PGDLLEXPORT void PgCronLauncherMain(Datum arg); PGDLLEXPORT void CronBackgroundWorker(Datum arg); @@ -143,6 +143,7 @@ static void ExecuteSqlString(const char *sql); static void GetTaskFeedback(PGresult *result, CronTask *task); static void ProcessBgwTaskFeedback(CronTask *task, bool running); +static void CronNoticeReceiver(void *arg, const PGresult *result); static bool jobCanceled(CronTask *task); static bool jobStartupTimeout(CronTask *task, TimestampTz currentTime); @@ -167,7 +168,7 @@ static int CronLogMinMessages = WARNING; static bool UseBackgroundWorkers = false; -char *cron_timezone = NULL; +static char *cron_timezone = NULL; static const struct config_enum_entry cron_message_level_options[] = { {"debug5", DEBUG5, false}, @@ -1367,6 +1368,7 @@ connection = PQconnectStartParams(keywordArray, valueArray, false); PQsetnonblocking(connection, 1); + PQsetNoticeReceiver(connection, CronNoticeReceiver, (void *) task); connectionStatus = PQstatus(connection); if (connectionStatus == CONNECTION_BAD) @@ -1619,8 +1621,8 @@ case CRON_TASK_SENDING: { - char *command = cronJob->command; int sendResult = 0; + char *command = NULL; Assert(!UseBackgroundWorkers); @@ -1648,6 +1650,7 @@ break; } + command = cronJob->command; sendResult = PQsendQuery(connection, command); if (sendResult == 1) { @@ -1996,8 +1999,11 @@ UpdateJobRunDetail(task->runId, NULL, GetCronStatus(CRON_STATUS_SUCCEEDED), display_msg.data, NULL, &end_time); } - ereport(LOG, (errmsg("cron job " INT64_FORMAT ": %s", - task->jobId, display_msg.data))); + /* + * We do not log the message, since the original process probably + * already did that. + */ + pfree(display_msg.data); break; @@ -2068,7 +2074,7 @@ ALLOCSET_DEFAULT_MAXSIZE); /* Set up a dynamic shared memory segment. */ - seg = dsm_attach(DatumGetInt32(main_arg)); + seg = dsm_attach(DatumGetUInt32(main_arg)); if (seg == NULL) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), @@ -2278,8 +2284,10 @@ (void) PortalRun(portal, FETCH_ALL, isTopLevel, receiver, receiver, completionTag); #elif PG_VERSION_NUM < 130000 (void) PortalRun(portal, FETCH_ALL, isTopLevel,true, receiver, receiver, completionTag); - #else + #elif PG_VERSION_NUM < 180000 (void) PortalRun(portal, FETCH_ALL, isTopLevel, true, receiver, receiver, &qc); + #else + (void) PortalRun(portal, FETCH_ALL, isTopLevel, receiver, receiver, &qc); #endif /* Clean up the receiver. */ @@ -2356,3 +2364,14 @@ else return false; } + + +/* + * CronNoticeReceiver processes a libpq notice. We generally ignore + * these because they are usually already logged by the original process. + */ +static void +CronNoticeReceiver(void *arg, const PGresult *result) +{ + +}
