-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add telemetry job and turn off default jobs in tests
This adds the telemetry job to the job scheduler. Telemetry is scheduled to run every 24 hours with a 1 hour exponential backoff retry period. Additional fixes related to the telemetry job: - Add separate ID space to the bgw_job table for default jobs. We do not dump this ID space inside pg_dump to prevent job insertion conflicts. - Add check to update scripts for default jobs. - Change shmem_callback so that it doesn't modify state since state transitions are not atomic with respect to interrupts and interrupt callbacks. - Disable default telemetry job in regression and docker tests.
- Loading branch information
1 parent
efab2aa
commit f662ae1
Showing
17 changed files
with
116 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
CREATE OR REPLACE FUNCTION _timescaledb_internal.restart_background_workers() | ||
RETURNS BOOL | ||
RETURNS BOOL | ||
AS '@LOADER_PATHNAME@', 'ts_bgw_db_workers_restart' | ||
LANGUAGE C VOLATILE; | ||
|
||
CREATE OR REPLACE FUNCTION _timescaledb_internal.stop_background_workers() | ||
RETURNS BOOL | ||
RETURNS BOOL | ||
AS '@LOADER_PATHNAME@', 'ts_bgw_db_workers_stop' | ||
LANGUAGE C VOLATILE; | ||
|
||
CREATE OR REPLACE FUNCTION _timescaledb_internal.start_background_workers() | ||
RETURNS BOOL | ||
RETURNS BOOL | ||
AS '@LOADER_PATHNAME@', 'ts_bgw_db_workers_start' | ||
LANGUAGE C VOLATILE; | ||
|
||
SELECT _timescaledb_internal.start_background_workers(); | ||
|
||
INSERT INTO _timescaledb_config.bgw_job (id, application_name, job_type, schedule_INTERVAL, max_runtime, max_retries, retry_period) VALUES | ||
(1, 'Telemetry Reporter', 'telemetry_and_version_check_if_enabled', INTERVAL '24h', INTERVAL '100s', -1, INTERVAL '1h') | ||
ON CONFLICT (id) DO NOTHING; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.