Mats Kindahl 62e6235919 Restart scheduler on error
If the scheduler receives an error, it will never restart again since
`bgw_restart_time` is set to `BGW_NEVER_RESTART`, which will prevent
all jobs from executing.

This commit adds the GUC `timescaledb.bgw_scheduler_restart_time` that
can be set to the restart time for the scheduler. It defaults
to 60 seconds, which is the default restart interval for background
workers defined by PostgreSQL.

It also adds `timescaledb.debug_bgw_scheduler_exit_status` to be able
to shutdown the scheduler with a non-zero exit status, which allows the
restart functionality to be tested.

It also ensures that `backend_type` is explicitly set up rather than
copied from `application_name` and add some more information to
`application_name`. It also updates the tests to use `backend_type`
where applicable.

To avoid exhausting slots when the launcher restarts, it will kill all
existing schedulers and start new ones. Since background worker slots
are easily exhausted in the `bgw_launcher` test, we do not run it
repeatedly in the flakes workflow.
2025-01-10 21:57:03 +01:00
..
2025-01-10 21:57:03 +01:00
2023-11-15 12:17:33 -03:00
2025-01-10 21:57:03 +01:00
2025-01-10 21:57:03 +01:00
2024-07-25 14:01:53 +02:00
2022-09-23 11:40:48 +03:00
2022-09-23 11:40:48 +03:00
2024-07-10 21:50:54 +02:00
2024-10-28 12:54:55 +01:00