mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-15 01:53:41 +08:00
Add option `USE_TELEMETRY` that can be used to exclude telemetry from the compile. Telemetry-specific SQL is moved, which is only included when extension is compiled with telemetry and the notice is changed so that the message about telemetry is not printed when Telemetry is not compiled in. The following code is not compiled in when telemetry is not used: - Cross-module functions for telemetry. - Checks for telemetry job in job execution. - GUC variables `telemetry_level` and `telemetry_cloud`. Telemetry subsystem is not included when compiling without telemetry, which requires some functions to be moved out of the telemetry subsystem: - Metadata handling is moved out of the telemetry module since it is used not only with telemetry. - UUID functions are moved into a separate module instead of being part of the telemetry subsystem. - Telemetry functions are either added or removed when updating from a previous version. Tests are updated to: - Not use telemetry functions to get UUID or Metadata and instead use the moved UUID and metadata functions. - Not include telemetry information in tests that do not require it. - Configuration files do not set telemetry variables when telemetry is not compiled in. - Replaced usage of telemetry functions in non-telemetry tests with other sources of same information. Fixes #3931
13 lines
474 B
SQL
13 lines
474 B
SQL
-- This file and its contents are licensed under the Apache License 2.0.
|
|
-- Please see the included NOTICE for copyright information and
|
|
-- LICENSE-APACHE for a copy of the license.
|
|
|
|
-- We drop the telemetry function here since we have a non-telemetry
|
|
-- build and the function might exist.
|
|
DROP FUNCTION IF EXISTS @extschema@.get_telemetry_report;
|
|
|
|
-- We delete the telemetry job since this is a non-telemetry build.
|
|
DELETE FROM _timescaledb_config.bgw_job WHERE id = 1;
|
|
|
|
|