Skip to content

Commit 30f5f5e

Browse files
Add internal TimescaleDB schemas to default_excluded_schemas (#663)
<!-- The PR description should answer 2 (maybe 3) important questions: --> ### What Introspection for TimescaleDB breaks by default because it tries to read these internal schema, let's include them by default. Source of names: https://github.com/timescale/timescaledb/blob/main/sql/pre_install/schemas.sql#L7 ### How Add to `default_excluded_schemas` in configuration versions 3, 4 and 5.
1 parent 90a6c21 commit 30f5f5e

6 files changed

+54
-6
lines changed

crates/configuration/src/version3/options.rs

+9
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ fn default_excluded_schemas() -> Vec<String> {
5959
// From Citus
6060
"columnar".to_string(),
6161
"columnar_internal".to_string(),
62+
// from TimescaleDB
63+
"_timescaledb_catalog".to_string(),
64+
"_timescaledb_functions".to_string(),
65+
"_timescaledb_internal".to_string(),
66+
"_timescaledb_cache".to_string(),
67+
"_timescaledb_config".to_string(),
68+
"timescaledb_experimental".to_string(),
69+
"timescaledb_information".to_string(),
70+
"_timescaledb_debug".to_string(),
6271
]
6372
}
6473

crates/configuration/src/version4/options.rs

+9
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ fn default_excluded_schemas() -> Vec<String> {
6565
// From Citus
6666
"columnar".to_string(),
6767
"columnar_internal".to_string(),
68+
// from TimescaleDB
69+
"_timescaledb_catalog".to_string(),
70+
"_timescaledb_functions".to_string(),
71+
"_timescaledb_internal".to_string(),
72+
"_timescaledb_cache".to_string(),
73+
"_timescaledb_config".to_string(),
74+
"timescaledb_experimental".to_string(),
75+
"timescaledb_information".to_string(),
76+
"_timescaledb_debug".to_string(),
6877
]
6978
}
7079

crates/configuration/src/version5/options.rs

+9
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ fn default_excluded_schemas() -> Vec<String> {
6565
// From Citus
6666
"columnar".to_string(),
6767
"columnar_internal".to_string(),
68+
// from TimescaleDB
69+
"_timescaledb_catalog".to_string(),
70+
"_timescaledb_functions".to_string(),
71+
"_timescaledb_internal".to_string(),
72+
"_timescaledb_cache".to_string(),
73+
"_timescaledb_config".to_string(),
74+
"timescaledb_experimental".to_string(),
75+
"timescaledb_information".to_string(),
76+
"_timescaledb_debug".to_string(),
6877
]
6978
}
7079

crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version3_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
source: crates/tests/databases-tests/src/postgres/cli_version3_tests.rs
33
expression: default_configuration
4-
snapshot_kind: text
54
---
65
{
76
"version": "3",
@@ -2526,7 +2525,15 @@ snapshot_kind: text
25262525
"tiger",
25272526
"crdb_internal",
25282527
"columnar",
2529-
"columnar_internal"
2528+
"columnar_internal",
2529+
"_timescaledb_catalog",
2530+
"_timescaledb_functions",
2531+
"_timescaledb_internal",
2532+
"_timescaledb_cache",
2533+
"_timescaledb_config",
2534+
"timescaledb_experimental",
2535+
"timescaledb_information",
2536+
"_timescaledb_debug"
25302537
],
25312538
"unqualifiedSchemasForTables": [
25322539
"public"

crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version4_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
source: crates/tests/databases-tests/src/postgres/cli_version4_tests.rs
33
expression: default_configuration
4-
snapshot_kind: text
54
---
65
{
76
"version": "4",
@@ -2852,7 +2851,15 @@ snapshot_kind: text
28522851
"tiger",
28532852
"crdb_internal",
28542853
"columnar",
2855-
"columnar_internal"
2854+
"columnar_internal",
2855+
"_timescaledb_catalog",
2856+
"_timescaledb_functions",
2857+
"_timescaledb_internal",
2858+
"_timescaledb_cache",
2859+
"_timescaledb_config",
2860+
"timescaledb_experimental",
2861+
"timescaledb_information",
2862+
"_timescaledb_debug"
28562863
],
28572864
"unqualifiedSchemasForTables": [
28582865
"public"

crates/tests/databases-tests/src/postgres/snapshots/databases_tests__postgres__cli_version5_tests__postgres_current_only_configure_initial_configuration_is_unchanged.snap

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
source: crates/tests/databases-tests/src/postgres/cli_version5_tests.rs
33
expression: default_configuration
4-
snapshot_kind: text
54
---
65
{
76
"version": "5",
@@ -2881,7 +2880,15 @@ snapshot_kind: text
28812880
"tiger",
28822881
"crdb_internal",
28832882
"columnar",
2884-
"columnar_internal"
2883+
"columnar_internal",
2884+
"_timescaledb_catalog",
2885+
"_timescaledb_functions",
2886+
"_timescaledb_internal",
2887+
"_timescaledb_cache",
2888+
"_timescaledb_config",
2889+
"timescaledb_experimental",
2890+
"timescaledb_information",
2891+
"_timescaledb_debug"
28852892
],
28862893
"unqualifiedSchemasForTables": [
28872894
"public"

0 commit comments

Comments
 (0)