timescale / timescaledb

An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension.
https://www.timescale.com/
Other
17.95k stars 883 forks source link

[Bug]: Automatically restart background worker scheduler #5091

Open mkindahl opened 1 year ago

mkindahl commented 1 year ago

What type of bug is this?

Other

What subsystems and features are affected?

Background worker

What happened?

If the scheduler exits for any reason, no more workers will be scheduled since the scheduler do not restart automatically.

This is because the scheduler is started with BGW_NEVER_RESTART as restart time.

TimescaleDB version affected

2.9.0

PostgreSQL version used

14.3

What operating system did you use?

Ubuntu 22.04 x86_64

What installation method did you use?

Source

What platform did you run on?

Not applicable

Relevant log output and stack trace

No response

How can we reproduce the bug?

Wait for the scheduler to exit with an error. This can be triggered creating duplicate job entries in the bgw_job table, for example.

mkindahl commented 11 months ago

There turned out to be issue with this over time since the slots are not released and new schedulers are started by the launcher.