citusdata / pg_cron

Run periodic jobs in PostgreSQL
PostgreSQL License
2.88k stars 193 forks source link

Segmentation fault pg_cron_unschedule #125

Open zacisco opened 3 years ago

zacisco commented 3 years ago
2021-01-29 16:39:12.149 MSK [15046] LOG:  background worker "pg_cron launcher" (PID 64352) was terminated by signal 11: Segmentation fault
2021-01-29 16:39:12.149 MSK [15046] LOG:  terminating any other active server processes
2021-01-29 16:39:12.149 MSK [65302] WARNING:  terminating connection because of crash of another server process
2021-01-29 16:39:12.149 MSK [65302] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2021-01-29 16:39:12.149 MSK [65302] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2021-01-29 16:39:12.394 MSK [65882] FATAL:  the database system is in recovery mode
2021-01-29 16:39:12.444 MSK [15046] LOG:  all server processes terminated; reinitializing
2021-01-29 16:39:13.293 MSK [65883] LOG:  database system was interrupted; last known up at 2021-01-29 16:33:06 MSK
2021-01-29 16:39:13.294 MSK [65886] FATAL:  the database system is in recovery mode
  1. in Java created cron task with timer every 1 min. to call procedure and get task id
  2. update task id field in user table (no anybody change that value)
  3. in the end of procedure call pg_cron_unschedule with that value id from user table

74

marcocitus commented 3 years ago

Thanks, can you share the version of pg_cron?

zacisco commented 3 years ago

v1.3.0 PS: and some little observation ... task is executed in one transaction after task is end (last update set task status is not active) it needed for other task for update task crontime. need run task only once but cron run task faster,than other task change crontime of needed task