diff --git a/docs/generated/settings/settings-for-tenants.txt b/docs/generated/settings/settings-for-tenants.txt index 1c5ee3a9318b..37dfcd072d7f 100644 --- a/docs/generated/settings/settings-for-tenants.txt +++ b/docs/generated/settings/settings-for-tenants.txt @@ -299,4 +299,4 @@ trace.opentelemetry.collector string address of an OpenTelemetry trace collecto trace.snapshot.rate duration 0s if non-zero, interval at which background trace snapshots are captured trace.span_registry.enabled boolean true if set, ongoing traces can be seen at https:///#/debug/tracez trace.zipkin.collector string the address of a Zipkin instance to receive traces, as :. If no port is specified, 9411 will be used. -version version 1000022.2-86 set the active cluster version in the format '.' +version version 1000022.2-90 set the active cluster version in the format '.' diff --git a/docs/generated/settings/settings.html b/docs/generated/settings/settings.html index 773b5215c895..cee8b19fe8b1 100644 --- a/docs/generated/settings/settings.html +++ b/docs/generated/settings/settings.html @@ -240,6 +240,6 @@
trace.snapshot.rate
duration0sif non-zero, interval at which background trace snapshots are captured
trace.span_registry.enabled
booleantrueif set, ongoing traces can be seen at https://<ui>/#/debug/tracez
trace.zipkin.collector
stringthe address of a Zipkin instance to receive traces, as <host>:<port>. If no port is specified, 9411 will be used. -
version
version1000022.2-86set the active cluster version in the format '<major>.<minor>' +
version
version1000022.2-90set the active cluster version in the format '<major>.<minor>' diff --git a/pkg/BUILD.bazel b/pkg/BUILD.bazel index 8749ac1d4153..f140b58f1fa5 100644 --- a/pkg/BUILD.bazel +++ b/pkg/BUILD.bazel @@ -1420,6 +1420,7 @@ GO_TARGETS = [ "//pkg/security/username:username_test", "//pkg/security:security", "//pkg/security:security_test", + "//pkg/server/autoconfig:autoconfig", "//pkg/server/debug/goroutineui:goroutineui", "//pkg/server/debug/goroutineui:goroutineui_test", "//pkg/server/debug/pprofui:pprofui", @@ -2794,6 +2795,7 @@ GET_X_DATA_TARGETS = [ "//pkg/security/sessionrevival:get_x_data", "//pkg/security/username:get_x_data", "//pkg/server:get_x_data", + "//pkg/server/autoconfig:get_x_data", "//pkg/server/debug:get_x_data", "//pkg/server/debug/goroutineui:get_x_data", "//pkg/server/debug/pprofui:get_x_data", diff --git a/pkg/ccl/backupccl/system_schema.go b/pkg/ccl/backupccl/system_schema.go index 5b1f99f69c4d..6b8d45caf900 100644 --- a/pkg/ccl/backupccl/system_schema.go +++ b/pkg/ccl/backupccl/system_schema.go @@ -574,6 +574,12 @@ var systemTableBackupConfiguration = map[string]systemBackupConfiguration{ systemschema.TenantUsageTable.GetName(): { shouldIncludeInClusterBackup: optOutOfClusterBackup, }, + systemschema.SystemTenantTasksTable.GetName(): { + shouldIncludeInClusterBackup: optOutOfClusterBackup, + }, + systemschema.SystemTaskPayloadsTable.GetName(): { + shouldIncludeInClusterBackup: optOutOfClusterBackup, + }, systemschema.SQLInstancesTable().GetName(): { shouldIncludeInClusterBackup: optOutOfClusterBackup, }, diff --git a/pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant b/pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant index 8e4cefc6b42d..700ece6cc097 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant +++ b/pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant @@ -338,12 +338,12 @@ txn_id txn_fingerprint_id query implicit_txn session_id start_time end_tim query ITTI SELECT range_id, start_pretty, end_pretty, lease_holder FROM crdb_internal.ranges ---- -59 /Tenant/10 /Tenant/11 1 +61 /Tenant/10 /Tenant/11 1 query ITT SELECT range_id, start_pretty, end_pretty FROM crdb_internal.ranges_no_leases ---- -59 /Tenant/10 /Tenant/11 +61 /Tenant/10 /Tenant/11 query IT SELECT zone_id, target FROM crdb_internal.zones ORDER BY 1 diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_remote_access_error b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_remote_access_error index 2bc59496dc05..7f3664474c57 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region_remote_access_error +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region_remote_access_error @@ -216,7 +216,7 @@ skipif config multiregion-9node-3region-3azs-vec-off query I retry SELECT DISTINCT range_id FROM [SHOW RANGES FROM TABLE messages_rbr] ---- -58 +60 # Update does not fail when accessing all rows in messages_rbr because lookup # join does not error out the lookup table in phase 1. diff --git a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_query_behavior b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_query_behavior index 92bb67161b14..7ec66c270fc9 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_query_behavior +++ b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row_query_behavior @@ -262,7 +262,7 @@ ap-southeast-2 23 query TT SELECT start_key, end_key FROM [SHOW RANGE FROM TABLE regional_by_row_table FOR ROW ('ap-southeast-2', 1)] ---- - … + … query TIIII SELECT crdb_region, pk, pk2, a, b FROM regional_by_row_table @@ -403,9 +403,10 @@ ALTER TABLE regional_by_row_table EXPERIMENTAL_RELOCATE VALUES (ARRAY[1], 'ap-so query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM INDEX regional_by_row_table@primary WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/"\x80"/0 {1} 1 + …/"\x80"/0 {1} 1 …/"\x80"/0 …/"\xc0"/0 {4} 4 …/"\xc0"/0 {7} 7 diff --git a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/basic b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/basic index 17539ea1f524..0f0e6ebcef8e 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/basic +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/basic @@ -64,6 +64,8 @@ upsert /Table/5{4-5} database system (host) upsert /Table/5{5-6} database system (host) upsert /Table/5{6-7} database system (host) upsert /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +upsert /Table/5{8-9} database system (host) +upsert /Table/{59-60} database system (host) exec-sql CREATE DATABASE db; @@ -110,6 +112,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/10{6-7} num_replicas=7 num_voters=5 /Table/10{7-8} num_replicas=7 /Table/11{2-3} num_replicas=7 @@ -217,6 +221,10 @@ delete /Table/5{5-6} upsert /Table/5{5-6} ttl_seconds=100 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true delete /Table/5{6-7} upsert /Table/5{6-7} ttl_seconds=100 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +delete /Table/5{8-9} +upsert /Table/5{8-9} ttl_seconds=100 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +delete /Table/{59-60} +upsert /Table/{59-60} ttl_seconds=100 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true state offset=5 limit=42 ---- diff --git a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/indexes b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/indexes index e870dfd2ccf3..f38c7a4a40a3 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/indexes +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/indexes @@ -31,6 +31,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/10{6-7} range default exec-sql @@ -62,6 +64,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/106{-/2} num_replicas=7 /Table/106/{2-3} num_replicas=7 num_voters=5 /Table/10{6/3-7} num_replicas=7 @@ -95,6 +99,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/106{-/2} ttl_seconds=3600 num_replicas=7 /Table/106/{2-3} ttl_seconds=25 num_replicas=7 num_voters=5 /Table/10{6/3-7} ttl_seconds=3600 num_replicas=7 @@ -118,6 +124,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/106{-/2} ttl_seconds=3600 num_replicas=9 /Table/106/{2-3} ttl_seconds=25 num_replicas=9 num_voters=5 /Table/10{6/3-7} ttl_seconds=3600 num_replicas=9 @@ -155,3 +163,5 @@ state offset=46 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) diff --git a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/basic b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/basic index 1ad5425a26ce..29e421a2c016 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/basic +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/basic @@ -32,6 +32,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Tenant/10{-\x00} database system (tenant) /Tenant/11{-\x00} database system (tenant) /Tenant/12{-\x00} database system (tenant) @@ -100,6 +102,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Tenant/10{-/Table/4} database system (tenant) /Tenant/10/Table/{4-5} database system (tenant) /Tenant/10/Table/{5-6} database system (tenant) @@ -167,6 +171,8 @@ upsert /Tenant/10/Table/11{3-4} range default state offset=81 ---- ... +/Tenant/10/Table/3{3-4} database system (tenant) +/Tenant/10/Table/3{4-5} database system (tenant) /Tenant/10/Table/3{5-6} database system (tenant) /Tenant/10/Table/3{6-7} database system (tenant) /Tenant/10/Table/3{7-8} database system (tenant) diff --git a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/protectedts b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/protectedts index f702a47dc67e..4cd3979a3336 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/protectedts +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/protectedts @@ -29,6 +29,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Tenant/10{-\x00} database system (tenant) /Tenant/11{-\x00} database system (tenant) diff --git a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/range_tenants b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/range_tenants index 4823087c7194..e1f7edca2634 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/range_tenants +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/range_tenants @@ -48,6 +48,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Tenant/10{-\x00} database system (tenant) /Tenant/11{-\x00} ttl_seconds=18000 ignore_strict_gc=true rangefeed_enabled=true /Tenant/12{-\x00} ttl_seconds=18000 ignore_strict_gc=true rangefeed_enabled=true @@ -74,6 +76,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Tenant/10{-/Table/4} database system (tenant) /Tenant/10/Table/{4-5} database system (tenant) /Tenant/10/Table/{5-6} database system (tenant) @@ -154,6 +158,8 @@ mutations discard tenant=11 state offset=81 ---- ... +/Tenant/10/Table/3{3-4} database system (tenant) +/Tenant/10/Table/3{4-5} database system (tenant) /Tenant/10/Table/3{5-6} database system (tenant) /Tenant/10/Table/3{6-7} database system (tenant) /Tenant/10/Table/3{7-8} database system (tenant) diff --git a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/tenant_end_key_split b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/tenant_end_key_split index ac6a68ec6b5c..9bef289f7a0f 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/tenant_end_key_split +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/tenant_end_key_split @@ -17,8 +17,10 @@ initialize tenant=11 state offset=57 limit=3 ---- ... +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Tenant/11{-\x00} database system (tenant) -/Tenant/12{-\x00} database system (tenant) +... # Start the reconciliation loop for the tenant=11. It'll first clear out its own # first-key record and install span configs for its SQL state. It won't touch @@ -35,8 +37,8 @@ state offset=56 limit=3 ---- ... /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true -/Tenant/11{-/Table/4} database system (tenant) -/Tenant/11/Table/{4-5} database system (tenant) +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) ... # Peek near the end of the span_configurations table where tenant=11's records @@ -45,8 +47,10 @@ state offset=56 limit=3 state offset=99 limit=3 ---- ... +/Tenant/11/Table/5{5-6} database system (tenant) +/Tenant/11/Table/5{6-7} database system (tenant) /Tenant/11/Table/5{7-8} database system (tenant) -/Tenant/12{-\x00} database system (tenant) +... # Just another view of what the tenant's reconciler actually did. It got rid of # the original, single-key /Tenant/11{-\x00} record, and replaced it with @@ -109,7 +113,7 @@ initialize tenant=10 state offset=57 limit=3 ---- ... +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Tenant/10{-\x00} database system (tenant) -/Tenant/11{-/Table/4} database system (tenant) -/Tenant/11/Table/{4-5} database system (tenant) ... diff --git a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/named_zones b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/named_zones index d9aab889579e..5e49dfe42745 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/named_zones +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/named_zones @@ -134,6 +134,8 @@ state offset=46 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/10{6-7} ttl_seconds=50 # Make sure future descendants observe the same. @@ -159,6 +161,8 @@ state offset=46 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/10{6-7} ttl_seconds=50 /Table/10{7-8} ttl_seconds=50 diff --git a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/partitions b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/partitions index 8a7dc17d6338..50bc22f7161d 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/partitions +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/partitions @@ -23,6 +23,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) exec-sql CREATE DATABASE db; @@ -52,6 +54,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/10{6-7} range default # All parent schema zone config changes cascade to the entire table's span. @@ -78,6 +82,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/10{6-7} num_replicas=7 num_voters=5 # Apply a zone configuration on one of the partitions, `one_two`, which @@ -109,6 +115,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/106{-/1/1} num_replicas=7 num_voters=5 /Table/106/1/{1-2} global_reads=true num_replicas=7 num_voters=5 /Table/106/1/{2-3} global_reads=true num_replicas=7 num_voters=5 @@ -140,6 +148,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/106{-/1/1} num_replicas=7 num_voters=5 /Table/106/1/{1-2} global_reads=true num_replicas=7 num_voters=5 /Table/106/1/{2-3} global_reads=true num_replicas=7 num_voters=5 @@ -185,6 +195,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/106{-/1} num_replicas=7 num_voters=5 /Table/106/1{-/1} num_replicas=7 num_voters=6 /Table/106/1/{1-2} global_reads=true num_replicas=7 num_voters=5 @@ -228,6 +240,8 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/106{-/1} num_replicas=7 /Table/106/1{-/1} num_replicas=7 num_voters=6 /Table/106/1/{1-2} global_reads=true num_replicas=7 @@ -265,3 +279,5 @@ state offset=47 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) diff --git a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/protectedts b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/protectedts index bd80bf4b368b..1945680b4601 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/protectedts +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/protectedts @@ -86,6 +86,8 @@ state offset=51 /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/10{6-7} protection_policies=[{ts: 3} {ts: 4}] /Table/10{7-8} protection_policies=[{ts: 3} {ts: 4}] @@ -134,6 +136,8 @@ state limit=2 state offset=57 ---- ... +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/10{6-7} protection_policies=[{ts: 3} {ts: 4}] /Table/10{7-8} protection_policies=[{ts: 3} {ts: 4}] @@ -148,5 +152,7 @@ release record-id=4 state offset=57 ---- ... +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/10{6-7} range default /Table/10{7-8} range default diff --git a/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/full_translate b/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/full_translate index 67e7a2376289..2f92027f5211 100644 --- a/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/full_translate +++ b/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/full_translate @@ -80,6 +80,8 @@ full-translate /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) /Table/11{0-1} range default /Table/11{1-2} range default /Table/11{2-3} range default diff --git a/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/full_translate_named_zones_deleted b/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/full_translate_named_zones_deleted index a54270ddf03f..363b2be63255 100644 --- a/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/full_translate_named_zones_deleted +++ b/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/full_translate_named_zones_deleted @@ -95,3 +95,5 @@ full-translate /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) diff --git a/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/system_database b/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/system_database index ac5505f4bfe9..b4912182554d 100644 --- a/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/system_database +++ b/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/system_database @@ -56,6 +56,8 @@ translate database=system /Table/5{5-6} database system (host) /Table/5{6-7} database system (host) /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/5{8-9} database system (host) +/Table/{59-60} database system (host) # Alter zone config fields on the database to ensure the effects cascade. exec-sql @@ -116,6 +118,8 @@ translate database=system /Table/5{5-6} ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true /Table/5{6-7} ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true +/Table/5{8-9} ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true +/Table/{59-60} ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true # Alter a named range that maps to a pseudo table ID, ensuring that its effects # are independent. @@ -182,3 +186,5 @@ full-translate /Table/5{5-6} ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true /Table/5{6-7} ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true /Table/5{7-8} ttl_seconds=3600 ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true +/Table/5{8-9} ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true +/Table/{59-60} ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true diff --git a/pkg/cli/testdata/declarative-rules/deprules b/pkg/cli/testdata/declarative-rules/deprules index 121c11cdbda6..30ea992a37c9 100644 --- a/pkg/cli/testdata/declarative-rules/deprules +++ b/pkg/cli/testdata/declarative-rules/deprules @@ -1,6 +1,6 @@ dep ---- -debug declarative-print-rules 1000022.2-86 dep +debug declarative-print-rules 1000022.2-90 dep deprules ---- - name: 'CheckConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED' diff --git a/pkg/cli/testdata/declarative-rules/oprules b/pkg/cli/testdata/declarative-rules/oprules index b2ad4c3262d9..f947541bd949 100644 --- a/pkg/cli/testdata/declarative-rules/oprules +++ b/pkg/cli/testdata/declarative-rules/oprules @@ -1,6 +1,6 @@ op ---- -debug declarative-print-rules 1000022.2-86 op +debug declarative-print-rules 1000022.2-90 op rules ---- [] diff --git a/pkg/cli/testdata/doctor/test_examine_cluster b/pkg/cli/testdata/doctor/test_examine_cluster index 6da9dc1183d4..cb87a51b5a23 100644 --- a/pkg/cli/testdata/doctor/test_examine_cluster +++ b/pkg/cli/testdata/doctor/test_examine_cluster @@ -1,7 +1,7 @@ debug doctor examine cluster ---- debug doctor examine cluster -Examining 53 descriptors and 52 namespace entries... +Examining 55 descriptors and 54 namespace entries... ParentID 100, ParentSchemaID 101: relation "foo" (105): expected matching namespace entry, found none -Examining 14 jobs... +Examining 16 jobs... ERROR: validation failed diff --git a/pkg/cli/testdata/zip/partial1 b/pkg/cli/testdata/zip/partial1 index 66fb72dcf1e3..e7e33b9a0fba 100644 --- a/pkg/cli/testdata/zip/partial1 +++ b/pkg/cli/testdata/zip/partial1 @@ -66,7 +66,9 @@ debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null [cluster] retrieving SQL data for system.statement_diagnostics... writing output: debug/system.statement_diagnostics.txt... done [cluster] retrieving SQL data for system.statement_diagnostics_requests... writing output: debug/system.statement_diagnostics_requests.txt... done [cluster] retrieving SQL data for system.table_statistics... writing output: debug/system.table_statistics.txt... done +[cluster] retrieving SQL data for system.task_payloads... writing output: debug/system.task_payloads.txt... done [cluster] retrieving SQL data for system.tenant_settings... writing output: debug/system.tenant_settings.txt... done +[cluster] retrieving SQL data for system.tenant_tasks... writing output: debug/system.tenant_tasks.txt... done [cluster] retrieving SQL data for system.tenant_usage... writing output: debug/system.tenant_usage.txt... done [cluster] retrieving SQL data for system.tenants... writing output: debug/system.tenants.txt... done [cluster] requesting nodes... received response... converting to JSON... writing binary output: debug/nodes.json... done @@ -114,7 +116,7 @@ debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null [node 1] 1 log file ... [node 1] [log file ... [node 1] requesting ranges... received response... done -[node 1] 58 ranges found +[node 1] 60 ranges found [node 1] writing range 1... converting to JSON... writing binary output: debug/nodes/1/ranges/1.json... done [node 1] writing range 2... converting to JSON... writing binary output: debug/nodes/1/ranges/2.json... done [node 1] writing range 3... converting to JSON... writing binary output: debug/nodes/1/ranges/3.json... done @@ -173,6 +175,8 @@ debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null [node 1] writing range 56... converting to JSON... writing binary output: debug/nodes/1/ranges/56.json... done [node 1] writing range 57... converting to JSON... writing binary output: debug/nodes/1/ranges/57.json... done [node 1] writing range 58... converting to JSON... writing binary output: debug/nodes/1/ranges/58.json... done +[node 1] writing range 59... converting to JSON... writing binary output: debug/nodes/1/ranges/59.json... done +[node 1] writing range 60... converting to JSON... writing binary output: debug/nodes/1/ranges/60.json... done [node 2] node status... converting to JSON... writing binary output: debug/nodes/2/status.json... done [node 2] using SQL connection URL: postgresql://... [node 2] retrieving SQL data for crdb_internal.active_range_feeds... writing output: debug/nodes/2/crdb_internal.active_range_feeds.txt... @@ -311,7 +315,7 @@ debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null [node 3] 1 log file ... [node 3] [log file ... [node 3] requesting ranges... received response... done -[node 3] 58 ranges found +[node 3] 60 ranges found [node 3] writing range 1... converting to JSON... writing binary output: debug/nodes/3/ranges/1.json... done [node 3] writing range 2... converting to JSON... writing binary output: debug/nodes/3/ranges/2.json... done [node 3] writing range 3... converting to JSON... writing binary output: debug/nodes/3/ranges/3.json... done @@ -370,6 +374,8 @@ debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null [node 3] writing range 56... converting to JSON... writing binary output: debug/nodes/3/ranges/56.json... done [node 3] writing range 57... converting to JSON... writing binary output: debug/nodes/3/ranges/57.json... done [node 3] writing range 58... converting to JSON... writing binary output: debug/nodes/3/ranges/58.json... done +[node 3] writing range 59... converting to JSON... writing binary output: debug/nodes/3/ranges/59.json... done +[node 3] writing range 60... converting to JSON... writing binary output: debug/nodes/3/ranges/60.json... done [cluster] pprof summary script... writing binary output: debug/pprof-summary.sh... done [cluster] hot range summary script... writing binary output: debug/hot-ranges.sh... done [cluster] tenant hot range summary script... writing binary output: debug/hot-ranges-tenant.sh... done diff --git a/pkg/cli/testdata/zip/partial1_excluded b/pkg/cli/testdata/zip/partial1_excluded index 592c44198e13..263a54ed6e44 100644 --- a/pkg/cli/testdata/zip/partial1_excluded +++ b/pkg/cli/testdata/zip/partial1_excluded @@ -66,7 +66,9 @@ debug zip /dev/null --concurrency=1 --exclude-nodes=2 --cpu-profile-duration=0 [cluster] retrieving SQL data for system.statement_diagnostics... writing output: debug/system.statement_diagnostics.txt... done [cluster] retrieving SQL data for system.statement_diagnostics_requests... writing output: debug/system.statement_diagnostics_requests.txt... done [cluster] retrieving SQL data for system.table_statistics... writing output: debug/system.table_statistics.txt... done +[cluster] retrieving SQL data for system.task_payloads... writing output: debug/system.task_payloads.txt... done [cluster] retrieving SQL data for system.tenant_settings... writing output: debug/system.tenant_settings.txt... done +[cluster] retrieving SQL data for system.tenant_tasks... writing output: debug/system.tenant_tasks.txt... done [cluster] retrieving SQL data for system.tenant_usage... writing output: debug/system.tenant_usage.txt... done [cluster] retrieving SQL data for system.tenants... writing output: debug/system.tenants.txt... done [cluster] requesting nodes... received response... converting to JSON... writing binary output: debug/nodes.json... done @@ -114,7 +116,7 @@ debug zip /dev/null --concurrency=1 --exclude-nodes=2 --cpu-profile-duration=0 [node 1] 1 log file ... [node 1] [log file ... [node 1] requesting ranges... received response... done -[node 1] 58 ranges found +[node 1] 60 ranges found [node 1] writing range 1... converting to JSON... writing binary output: debug/nodes/1/ranges/1.json... done [node 1] writing range 2... converting to JSON... writing binary output: debug/nodes/1/ranges/2.json... done [node 1] writing range 3... converting to JSON... writing binary output: debug/nodes/1/ranges/3.json... done @@ -173,6 +175,8 @@ debug zip /dev/null --concurrency=1 --exclude-nodes=2 --cpu-profile-duration=0 [node 1] writing range 56... converting to JSON... writing binary output: debug/nodes/1/ranges/56.json... done [node 1] writing range 57... converting to JSON... writing binary output: debug/nodes/1/ranges/57.json... done [node 1] writing range 58... converting to JSON... writing binary output: debug/nodes/1/ranges/58.json... done +[node 1] writing range 59... converting to JSON... writing binary output: debug/nodes/1/ranges/59.json... done +[node 1] writing range 60... converting to JSON... writing binary output: debug/nodes/1/ranges/60.json... done [node 2] skipping node... writing binary output: debug/nodes/2.skipped... done [node 3] node status... converting to JSON... writing binary output: debug/nodes/3/status.json... done [node 3] using SQL connection URL: postgresql://... @@ -214,7 +218,7 @@ debug zip /dev/null --concurrency=1 --exclude-nodes=2 --cpu-profile-duration=0 [node 3] 1 log file ... [node 3] [log file ... [node 3] requesting ranges... received response... done -[node 3] 58 ranges found +[node 3] 60 ranges found [node 3] writing range 1... converting to JSON... writing binary output: debug/nodes/3/ranges/1.json... done [node 3] writing range 2... converting to JSON... writing binary output: debug/nodes/3/ranges/2.json... done [node 3] writing range 3... converting to JSON... writing binary output: debug/nodes/3/ranges/3.json... done @@ -273,6 +277,8 @@ debug zip /dev/null --concurrency=1 --exclude-nodes=2 --cpu-profile-duration=0 [node 3] writing range 56... converting to JSON... writing binary output: debug/nodes/3/ranges/56.json... done [node 3] writing range 57... converting to JSON... writing binary output: debug/nodes/3/ranges/57.json... done [node 3] writing range 58... converting to JSON... writing binary output: debug/nodes/3/ranges/58.json... done +[node 3] writing range 59... converting to JSON... writing binary output: debug/nodes/3/ranges/59.json... done +[node 3] writing range 60... converting to JSON... writing binary output: debug/nodes/3/ranges/60.json... done [cluster] pprof summary script... writing binary output: debug/pprof-summary.sh... done [cluster] hot range summary script... writing binary output: debug/hot-ranges.sh... done [cluster] tenant hot range summary script... writing binary output: debug/hot-ranges-tenant.sh... done diff --git a/pkg/cli/testdata/zip/partial2 b/pkg/cli/testdata/zip/partial2 index 355d8a842ca1..9ce0d9c5ce4c 100644 --- a/pkg/cli/testdata/zip/partial2 +++ b/pkg/cli/testdata/zip/partial2 @@ -66,7 +66,9 @@ debug zip --concurrency=1 --cpu-profile-duration=0 /dev/null [cluster] retrieving SQL data for system.statement_diagnostics... writing output: debug/system.statement_diagnostics.txt... done [cluster] retrieving SQL data for system.statement_diagnostics_requests... writing output: debug/system.statement_diagnostics_requests.txt... done [cluster] retrieving SQL data for system.table_statistics... writing output: debug/system.table_statistics.txt... done +[cluster] retrieving SQL data for system.task_payloads... writing output: debug/system.task_payloads.txt... done [cluster] retrieving SQL data for system.tenant_settings... writing output: debug/system.tenant_settings.txt... done +[cluster] retrieving SQL data for system.tenant_tasks... writing output: debug/system.tenant_tasks.txt... done [cluster] retrieving SQL data for system.tenant_usage... writing output: debug/system.tenant_usage.txt... done [cluster] retrieving SQL data for system.tenants... writing output: debug/system.tenants.txt... done [cluster] requesting nodes... received response... converting to JSON... writing binary output: debug/nodes.json... done @@ -114,7 +116,7 @@ debug zip --concurrency=1 --cpu-profile-duration=0 /dev/null [node 1] 1 log file ... [node 1] [log file ... [node 1] requesting ranges... received response... done -[node 1] 58 ranges found +[node 1] 60 ranges found [node 1] writing range 1... converting to JSON... writing binary output: debug/nodes/1/ranges/1.json... done [node 1] writing range 2... converting to JSON... writing binary output: debug/nodes/1/ranges/2.json... done [node 1] writing range 3... converting to JSON... writing binary output: debug/nodes/1/ranges/3.json... done @@ -173,6 +175,8 @@ debug zip --concurrency=1 --cpu-profile-duration=0 /dev/null [node 1] writing range 56... converting to JSON... writing binary output: debug/nodes/1/ranges/56.json... done [node 1] writing range 57... converting to JSON... writing binary output: debug/nodes/1/ranges/57.json... done [node 1] writing range 58... converting to JSON... writing binary output: debug/nodes/1/ranges/58.json... done +[node 1] writing range 59... converting to JSON... writing binary output: debug/nodes/1/ranges/59.json... done +[node 1] writing range 60... converting to JSON... writing binary output: debug/nodes/1/ranges/60.json... done [node 3] node status... converting to JSON... writing binary output: debug/nodes/3/status.json... done [node 3] using SQL connection URL: postgresql://... [node 3] retrieving SQL data for crdb_internal.active_range_feeds... writing output: debug/nodes/3/crdb_internal.active_range_feeds.txt... done @@ -213,7 +217,7 @@ debug zip --concurrency=1 --cpu-profile-duration=0 /dev/null [node 3] 1 log file ... [node 3] [log file ... [node 3] requesting ranges... received response... done -[node 3] 58 ranges found +[node 3] 60 ranges found [node 3] writing range 1... converting to JSON... writing binary output: debug/nodes/3/ranges/1.json... done [node 3] writing range 2... converting to JSON... writing binary output: debug/nodes/3/ranges/2.json... done [node 3] writing range 3... converting to JSON... writing binary output: debug/nodes/3/ranges/3.json... done @@ -272,6 +276,8 @@ debug zip --concurrency=1 --cpu-profile-duration=0 /dev/null [node 3] writing range 56... converting to JSON... writing binary output: debug/nodes/3/ranges/56.json... done [node 3] writing range 57... converting to JSON... writing binary output: debug/nodes/3/ranges/57.json... done [node 3] writing range 58... converting to JSON... writing binary output: debug/nodes/3/ranges/58.json... done +[node 3] writing range 59... converting to JSON... writing binary output: debug/nodes/3/ranges/59.json... done +[node 3] writing range 60... converting to JSON... writing binary output: debug/nodes/3/ranges/60.json... done [cluster] pprof summary script... writing binary output: debug/pprof-summary.sh... done [cluster] hot range summary script... writing binary output: debug/hot-ranges.sh... done [cluster] tenant hot range summary script... writing binary output: debug/hot-ranges-tenant.sh... done diff --git a/pkg/cli/testdata/zip/testzip b/pkg/cli/testdata/zip/testzip index 7b94101772a5..46f3244c9a89 100644 --- a/pkg/cli/testdata/zip/testzip +++ b/pkg/cli/testdata/zip/testzip @@ -66,7 +66,9 @@ debug zip --concurrency=1 --cpu-profile-duration=1s /dev/null [cluster] retrieving SQL data for system.statement_diagnostics... writing output: debug/system.statement_diagnostics.txt... done [cluster] retrieving SQL data for system.statement_diagnostics_requests... writing output: debug/system.statement_diagnostics_requests.txt... done [cluster] retrieving SQL data for system.table_statistics... writing output: debug/system.table_statistics.txt... done +[cluster] retrieving SQL data for system.task_payloads... writing output: debug/system.task_payloads.txt... done [cluster] retrieving SQL data for system.tenant_settings... writing output: debug/system.tenant_settings.txt... done +[cluster] retrieving SQL data for system.tenant_tasks... writing output: debug/system.tenant_tasks.txt... done [cluster] retrieving SQL data for system.tenant_usage... writing output: debug/system.tenant_usage.txt... done [cluster] retrieving SQL data for system.tenants... writing output: debug/system.tenants.txt... done [cluster] requesting nodes... received response... converting to JSON... writing binary output: debug/nodes.json... done @@ -114,7 +116,7 @@ debug zip --concurrency=1 --cpu-profile-duration=1s /dev/null [node 1] requesting log file ... [node 1] 0 log file ... [node 1] requesting ranges... received response... done -[node 1] 58 ranges found +[node 1] 60 ranges found [node 1] writing range 1... converting to JSON... writing binary output: debug/nodes/1/ranges/1.json... done [node 1] writing range 2... converting to JSON... writing binary output: debug/nodes/1/ranges/2.json... done [node 1] writing range 3... converting to JSON... writing binary output: debug/nodes/1/ranges/3.json... done @@ -173,6 +175,8 @@ debug zip --concurrency=1 --cpu-profile-duration=1s /dev/null [node 1] writing range 56... converting to JSON... writing binary output: debug/nodes/1/ranges/56.json... done [node 1] writing range 57... converting to JSON... writing binary output: debug/nodes/1/ranges/57.json... done [node 1] writing range 58... converting to JSON... writing binary output: debug/nodes/1/ranges/58.json... done +[node 1] writing range 59... converting to JSON... writing binary output: debug/nodes/1/ranges/59.json... done +[node 1] writing range 60... converting to JSON... writing binary output: debug/nodes/1/ranges/60.json... done [cluster] pprof summary script... writing binary output: debug/pprof-summary.sh... done [cluster] hot range summary script... writing binary output: debug/hot-ranges.sh... done [cluster] tenant hot range summary script... writing binary output: debug/hot-ranges-tenant.sh... done diff --git a/pkg/cli/testdata/zip/testzip_concurrent b/pkg/cli/testdata/zip/testzip_concurrent index 0159f63d8cf8..cbe00c84148f 100644 --- a/pkg/cli/testdata/zip/testzip_concurrent +++ b/pkg/cli/testdata/zip/testzip_concurrent @@ -218,9 +218,15 @@ zip [cluster] retrieving SQL data for system.table_statistics... [cluster] retrieving SQL data for system.table_statistics: done [cluster] retrieving SQL data for system.table_statistics: writing output: debug/system.table_statistics.txt... +[cluster] retrieving SQL data for system.task_payloads... +[cluster] retrieving SQL data for system.task_payloads: done +[cluster] retrieving SQL data for system.task_payloads: writing output: debug/system.task_payloads.txt... [cluster] retrieving SQL data for system.tenant_settings... [cluster] retrieving SQL data for system.tenant_settings: done [cluster] retrieving SQL data for system.tenant_settings: writing output: debug/system.tenant_settings.txt... +[cluster] retrieving SQL data for system.tenant_tasks... +[cluster] retrieving SQL data for system.tenant_tasks: done +[cluster] retrieving SQL data for system.tenant_tasks: writing output: debug/system.tenant_tasks.txt... [cluster] retrieving SQL data for system.tenant_usage... [cluster] retrieving SQL data for system.tenant_usage: done [cluster] retrieving SQL data for system.tenant_usage: writing output: debug/system.tenant_usage.txt... @@ -234,7 +240,7 @@ zip [cluster] using SQL address: ... [cluster] using SQL address: ... [node 1] 1 log file ... -[node 1] 58 ranges found +[node 1] 60 ranges found [node 1] [log file ... [node 1] [log file ... [node 1] [log file ... @@ -566,10 +572,18 @@ zip [node 1] writing range 58: converting to JSON... [node 1] writing range 58: done [node 1] writing range 58: writing binary output: debug/nodes/1/ranges/58.json... +[node 1] writing range 59... +[node 1] writing range 59: converting to JSON... +[node 1] writing range 59: done +[node 1] writing range 59: writing binary output: debug/nodes/1/ranges/59.json... [node 1] writing range 5: converting to JSON... [node 1] writing range 5: done [node 1] writing range 5: writing binary output: debug/nodes/1/ranges/5.json... [node 1] writing range 6... +[node 1] writing range 60... +[node 1] writing range 60: converting to JSON... +[node 1] writing range 60: done +[node 1] writing range 60: writing binary output: debug/nodes/1/ranges/60.json... [node 1] writing range 6: converting to JSON... [node 1] writing range 6: done [node 1] writing range 6: writing binary output: debug/nodes/1/ranges/6.json... @@ -586,7 +600,7 @@ zip [node 1] writing range 9: done [node 1] writing range 9: writing binary output: debug/nodes/1/ranges/9.json... [node 2] 1 log file ... -[node 2] 58 ranges found +[node 2] 60 ranges found [node 2] [log file ... [node 2] [log file ... [node 2] [log file ... @@ -918,10 +932,18 @@ zip [node 2] writing range 58: converting to JSON... [node 2] writing range 58: done [node 2] writing range 58: writing binary output: debug/nodes/2/ranges/58.json... +[node 2] writing range 59... +[node 2] writing range 59: converting to JSON... +[node 2] writing range 59: done +[node 2] writing range 59: writing binary output: debug/nodes/2/ranges/59.json... [node 2] writing range 5: converting to JSON... [node 2] writing range 5: done [node 2] writing range 5: writing binary output: debug/nodes/2/ranges/5.json... [node 2] writing range 6... +[node 2] writing range 60... +[node 2] writing range 60: converting to JSON... +[node 2] writing range 60: done +[node 2] writing range 60: writing binary output: debug/nodes/2/ranges/60.json... [node 2] writing range 6: converting to JSON... [node 2] writing range 6: done [node 2] writing range 6: writing binary output: debug/nodes/2/ranges/6.json... @@ -938,7 +960,7 @@ zip [node 2] writing range 9: done [node 2] writing range 9: writing binary output: debug/nodes/2/ranges/9.json... [node 3] 1 log file ... -[node 3] 58 ranges found +[node 3] 60 ranges found [node 3] [log file ... [node 3] [log file ... [node 3] [log file ... @@ -1270,10 +1292,18 @@ zip [node 3] writing range 58: converting to JSON... [node 3] writing range 58: done [node 3] writing range 58: writing binary output: debug/nodes/3/ranges/58.json... +[node 3] writing range 59... +[node 3] writing range 59: converting to JSON... +[node 3] writing range 59: done +[node 3] writing range 59: writing binary output: debug/nodes/3/ranges/59.json... [node 3] writing range 5: converting to JSON... [node 3] writing range 5: done [node 3] writing range 5: writing binary output: debug/nodes/3/ranges/5.json... [node 3] writing range 6... +[node 3] writing range 60... +[node 3] writing range 60: converting to JSON... +[node 3] writing range 60: done +[node 3] writing range 60: writing binary output: debug/nodes/3/ranges/60.json... [node 3] writing range 6: converting to JSON... [node 3] writing range 6: done [node 3] writing range 6: writing binary output: debug/nodes/3/ranges/6.json... diff --git a/pkg/cli/zip_table_registry.go b/pkg/cli/zip_table_registry.go index df62f27cf55c..187a3c28ced8 100644 --- a/pkg/cli/zip_table_registry.go +++ b/pkg/cli/zip_table_registry.go @@ -1216,6 +1216,30 @@ var zipSystemTables = DebugZipTableRegistry{ `"avgSize"`, }, }, + "system.task_payloads": { + // `value` column may contain customer info, such as URI params + // containing access keys, encryption salts, etc. + // `description` is user-defined and may contain PII. + nonSensitiveCols: NonSensitiveColumns{ + "id", + "created", + "owner", + "owner_id", + "min_version", + "type", + }, + }, + "system.tenant_tasks": { + nonSensitiveCols: NonSensitiveColumns{ + "tenant_id", + "issuer", + "task_id", + "created", + "payload_id", + "owner", + "owner_id", + }, + }, "system.tenant_settings": { customQueryRedacted: `SELECT * FROM ( SELECT * diff --git a/pkg/clusterversion/cockroach_versions.go b/pkg/clusterversion/cockroach_versions.go index 7b58e235252c..4ece0b7fbf84 100644 --- a/pkg/clusterversion/cockroach_versions.go +++ b/pkg/clusterversion/cockroach_versions.go @@ -490,6 +490,14 @@ const ( // the GC jobs to adopt the use of DelRange with tombstones. V23_1WaitedForDelRangeInGCJob + // V23_1_TaskSystemTables is the version where the system tables + // task_payloads and tenant_tasks have been created. + V23_1_TaskSystemTables + + // V23_1_CreateAutoConfigRunnerJob is the version where the auto + // config runner persistent job has been created. + V23_1_CreateAutoConfigRunnerJob + // ************************************************* // Step (1): Add new versions here. // Do not add new versions to a patch release. @@ -847,6 +855,14 @@ var rawVersionsSingleton = keyedVersions{ Key: V23_1WaitedForDelRangeInGCJob, Version: roachpb.Version{Major: 22, Minor: 2, Internal: 86}, }, + { + Key: V23_1_TaskSystemTables, + Version: roachpb.Version{Major: 22, Minor: 2, Internal: 88}, + }, + { + Key: V23_1_CreateAutoConfigRunnerJob, + Version: roachpb.Version{Major: 22, Minor: 2, Internal: 90}, + }, // ************************************************* // Step (2): Add new versions here. diff --git a/pkg/jobs/jobs_test.go b/pkg/jobs/jobs_test.go index 11ef33ad129e..e27e43e5f7c0 100644 --- a/pkg/jobs/jobs_test.go +++ b/pkg/jobs/jobs_test.go @@ -27,7 +27,7 @@ import ( "testing" "time" - "github.com/cockroachdb/apd/v3" + apd "github.com/cockroachdb/apd/v3" "github.com/cockroachdb/cockroach/pkg/base" "github.com/cockroachdb/cockroach/pkg/clusterversion" "github.com/cockroachdb/cockroach/pkg/jobs" @@ -238,6 +238,7 @@ func (rts *registryTestSuite) setUp(t *testing.T) { args.Knobs.UpgradeManager = &upgradebase.TestingKnobs{ DontUseJobs: true, SkipJobMetricsPollingJobBootstrap: true, + SkipAutoConfigRunnerJobBootstrap: true, } args.Knobs.KeyVisualizer = &keyvisualizer.TestingKnobs{SkipJobBootstrap: true} @@ -2073,13 +2074,13 @@ func TestShowAutomaticJobs(t *testing.T) { 2, "AUTO CREATE STATS", out.id, out.typ) } - sqlDB.QueryRow(t, `SELECT job_id, job_type FROM [SHOW JOBS]`).Scan(&out.id, &out.typ) + sqlDB.QueryRow(t, `SELECT job_id, job_type FROM [SHOW JOBS] ORDER BY job_id LIMIT 1`).Scan(&out.id, &out.typ) if out.id != 1 || out.typ != "CREATE STATS" { t.Fatalf("Expected id:%d and type:%s but found id:%d and type:%s", 1, "CREATE STATS", out.id, out.typ) } - sqlDB.QueryRow(t, `SELECT job_id, job_type FROM [SHOW AUTOMATIC JOBS]`).Scan(&out.id, &out.typ) + sqlDB.QueryRow(t, `SELECT job_id, job_type FROM [SHOW AUTOMATIC JOBS] ORDER BY job_id LIMIT 1`).Scan(&out.id, &out.typ) if out.id != 2 || out.typ != "AUTO CREATE STATS" { t.Fatalf("Expected id:%d and type:%s but found id:%d and type:%s", 2, "AUTO CREATE STATS", out.id, out.typ) diff --git a/pkg/jobs/jobspb/jobs.proto b/pkg/jobs/jobspb/jobs.proto index d866dff30974..7e6a0c2641d3 100644 --- a/pkg/jobs/jobspb/jobs.proto +++ b/pkg/jobs/jobspb/jobs.proto @@ -1171,6 +1171,12 @@ message PollJobsStatsDetails { message PollJobsStatsProgress { } +message AutoConfigRunnerDetails { +} + +message AutoConfigRunnerProgress { +} + message Payload { string description = 1; // If empty, the description is assumed to be the statement. @@ -1228,6 +1234,8 @@ message Payload { // PollJobsStats jobs poll the jobs table for statistics metrics as the number of // paused jobs. PollJobsStatsDetails poll_jobs_stats = 39; + + AutoConfigRunnerDetails auto_config_runner = 41; } reserved 26; // PauseReason is used to describe the reason that the job is currently paused @@ -1255,7 +1263,7 @@ message Payload { // specifies how old such record could get before this job is canceled. int64 maximum_pts_age = 40 [(gogoproto.casttype) = "time.Duration", (gogoproto.customname) = "MaximumPTSAge"]; - // NEXT ID: 41 + // NEXT ID: 42 } message Progress { @@ -1297,6 +1305,7 @@ message Progress { SchemaTelemetryProgress schema_telemetry = 26; KeyVisualizerProgress keyVisualizerProgress = 27; PollJobsStatsProgress pollJobsStats = 28; + AutoConfigRunnerProgress auto_config_runner = 29; } uint64 trace_id = 21 [(gogoproto.nullable) = false, (gogoproto.customname) = "TraceID", (gogoproto.customtype) = "github.com/cockroachdb/cockroach/pkg/util/tracing/tracingpb.TraceID"]; @@ -1328,6 +1337,7 @@ enum Type { AUTO_SCHEMA_TELEMETRY = 17 [(gogoproto.enumvalue_customname) = "TypeAutoSchemaTelemetry"]; KEY_VISUALIZER = 18 [(gogoproto.enumvalue_customname) = "TypeKeyVisualizer"]; POLL_JOBS_STATS = 19 [(gogoproto.enumvalue_customname) = "TypePollJobsStats"]; + AUTO_CONFIG_RUNNER = 20 [(gogoproto.enumvalue_customname) = "TypeAutoConfigRunner"]; } message Job { diff --git a/pkg/jobs/jobspb/wrap.go b/pkg/jobs/jobspb/wrap.go index 94a101b146f5..da0d2e592679 100644 --- a/pkg/jobs/jobspb/wrap.go +++ b/pkg/jobs/jobspb/wrap.go @@ -48,6 +48,7 @@ var ( _ Details = RowLevelTTLDetails{} _ Details = SchemaTelemetryDetails{} _ Details = KeyVisualizerDetails{} + _ Details = AutoConfigRunnerDetails{} ) // ProgressDetails is a marker interface for job progress details proto structs. @@ -68,6 +69,7 @@ var ( _ ProgressDetails = RowLevelTTLProgress{} _ ProgressDetails = SchemaTelemetryProgress{} _ ProgressDetails = KeyVisualizerProgress{} + _ ProgressDetails = AutoConfigRunnerProgress{} ) // Type returns the payload's job type and panics if the type is invalid. @@ -146,6 +148,7 @@ var AutomaticJobTypes = [...]Type{ TypeAutoSQLStatsCompaction, TypeAutoSchemaTelemetry, TypePollJobsStats, + TypeAutoConfigRunner, } // DetailsType returns the type for a payload detail. @@ -191,6 +194,8 @@ func DetailsType(d isPayload_Details) (Type, error) { return TypeKeyVisualizer, nil case *Payload_PollJobsStats: return TypePollJobsStats, nil + case *Payload_AutoConfigRunner: + return TypeAutoConfigRunner, nil default: return TypeUnspecified, errors.Newf("Payload.Type called on a payload with an unknown details type: %T", d) } @@ -231,6 +236,7 @@ var JobDetailsForEveryJobType = map[Type]Details{ TypeAutoSchemaTelemetry: SchemaTelemetryDetails{}, TypeKeyVisualizer: KeyVisualizerDetails{}, TypePollJobsStats: PollJobsStatsDetails{}, + TypeAutoConfigRunner: AutoConfigRunnerDetails{}, } // WrapProgressDetails wraps a ProgressDetails object in the protobuf wrapper @@ -278,6 +284,8 @@ func WrapProgressDetails(details ProgressDetails) interface { return &Progress_KeyVisualizerProgress{KeyVisualizerProgress: &d} case PollJobsStatsProgress: return &Progress_PollJobsStats{PollJobsStats: &d} + case AutoConfigRunnerProgress: + return &Progress_AutoConfigRunner{AutoConfigRunner: &d} default: panic(errors.AssertionFailedf("WrapProgressDetails: unknown progress type %T", d)) } @@ -323,6 +331,8 @@ func (p *Payload) UnwrapDetails() Details { return *d.KeyVisualizerDetails case *Payload_PollJobsStats: return *d.PollJobsStats + case *Payload_AutoConfigRunner: + return *d.AutoConfigRunner default: return nil } @@ -368,6 +378,8 @@ func (p *Progress) UnwrapDetails() ProgressDetails { return *d.KeyVisualizerProgress case *Progress_PollJobsStats: return *d.PollJobsStats + case *Progress_AutoConfigRunner: + return *d.AutoConfigRunner default: return nil } @@ -437,6 +449,8 @@ func WrapPayloadDetails(details Details) interface { return &Payload_KeyVisualizerDetails{KeyVisualizerDetails: &d} case PollJobsStatsDetails: return &Payload_PollJobsStats{PollJobsStats: &d} + case AutoConfigRunnerDetails: + return &Payload_AutoConfigRunner{AutoConfigRunner: &d} default: panic(errors.AssertionFailedf("jobs.WrapPayloadDetails: unknown details type %T", d)) } @@ -472,7 +486,7 @@ const ( func (Type) SafeValue() {} // NumJobTypes is the number of jobs types. -const NumJobTypes = 20 +const NumJobTypes = 21 // ChangefeedDetailsMarshaler allows for dependency injection of // cloud.SanitizeExternalStorageURI to avoid the dependency from this diff --git a/pkg/jobs/registry.go b/pkg/jobs/registry.go index d4abc60afc21..8511be7c649c 100644 --- a/pkg/jobs/registry.go +++ b/pkg/jobs/registry.go @@ -302,6 +302,9 @@ const ( // JobMetricsPollerJobID A static job ID is used for the job metrics polling job. JobMetricsPollerJobID = jobspb.JobID(101) + + // AutoConfigRunnerJobID A static job ID is used for the auto config runner job. + AutoConfigRunnerJobID = jobspb.JobID(102) ) // MakeJobID generates a new job ID. diff --git a/pkg/jobs/registry_test.go b/pkg/jobs/registry_test.go index 519a04550ac5..54289b0b3238 100644 --- a/pkg/jobs/registry_test.go +++ b/pkg/jobs/registry_test.go @@ -127,6 +127,7 @@ func TestRegistryGC(t *testing.T) { // This test wants to look at job records. DontUseJobs: true, SkipJobMetricsPollingJobBootstrap: true, + SkipAutoConfigRunnerJobBootstrap: true, }, KeyVisualizer: &keyvisualizer.TestingKnobs{ SkipJobBootstrap: true, @@ -277,6 +278,7 @@ func TestRegistryGCPagination(t *testing.T) { // This test wants to count job records. DontUseJobs: true, SkipJobMetricsPollingJobBootstrap: true, + SkipAutoConfigRunnerJobBootstrap: true, }, KeyVisualizer: &keyvisualizer.TestingKnobs{ SkipJobBootstrap: true, @@ -463,6 +465,7 @@ func TestBatchJobsCreation(t *testing.T) { UpgradeManager: &upgradebase.TestingKnobs{ DontUseJobs: true, SkipJobMetricsPollingJobBootstrap: true, + SkipAutoConfigRunnerJobBootstrap: true, }, KeyVisualizer: &keyvisualizer.TestingKnobs{ SkipJobBootstrap: true, @@ -643,6 +646,7 @@ func TestRetriesWithExponentialBackoff(t *testing.T) { UpgradeManager: &upgradebase.TestingKnobs{ DontUseJobs: true, SkipJobMetricsPollingJobBootstrap: true, + SkipAutoConfigRunnerJobBootstrap: true, }, KeyVisualizer: &keyvisualizer.TestingKnobs{ SkipJobBootstrap: true, diff --git a/pkg/kv/kvserver/client_tenant_test.go b/pkg/kv/kvserver/client_tenant_test.go index b504b7183ebb..3ac53831ad0f 100644 --- a/pkg/kv/kvserver/client_tenant_test.go +++ b/pkg/kv/kvserver/client_tenant_test.go @@ -285,7 +285,7 @@ func TestTenantRateLimiter(t *testing.T) { require.GreaterOrEqual(t, admittedMetricVal, tooManyWrites) // Allow a tolerance for other requests performed while starting the // tenant server. - require.Less(t, admittedMetricVal, tooManyWrites+300) + require.Less(t, admittedMetricVal, tooManyWrites+400) break } } diff --git a/pkg/server/autoconfig/BUILD.bazel b/pkg/server/autoconfig/BUILD.bazel new file mode 100644 index 000000000000..c0ba3ae9693b --- /dev/null +++ b/pkg/server/autoconfig/BUILD.bazel @@ -0,0 +1,17 @@ +load("//build/bazelutil/unused_checker:unused.bzl", "get_x_data") +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "autoconfig", + srcs = ["auto_config.go"], + importpath = "github.com/cockroachdb/cockroach/pkg/server/autoconfig", + visibility = ["//visibility:public"], + deps = [ + "//pkg/jobs", + "//pkg/jobs/jobspb", + "//pkg/settings/cluster", + "//pkg/sql", + ], +) + +get_x_data(name = "get_x_data") diff --git a/pkg/server/autoconfig/auto_config.go b/pkg/server/autoconfig/auto_config.go new file mode 100644 index 000000000000..f067ebaec6c5 --- /dev/null +++ b/pkg/server/autoconfig/auto_config.go @@ -0,0 +1,72 @@ +// Copyright 2023 The Cockroach Authors. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.txt. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0, included in the file +// licenses/APL.txt. + +package autoconfig + +import ( + "context" + + "github.com/cockroachdb/cockroach/pkg/jobs" + "github.com/cockroachdb/cockroach/pkg/jobs/jobspb" + "github.com/cockroachdb/cockroach/pkg/settings/cluster" + "github.com/cockroachdb/cockroach/pkg/sql" +) + +type autoConfigRunner struct { + job *jobs.Job +} + +var _ jobs.Resumer = (*autoConfigRunner)(nil) + +// OnFailOrCancel is a part of the Resumer interface. +func (r *autoConfigRunner) OnFailOrCancel( + ctx context.Context, execCtx interface{}, jobErr error, +) error { + return nil +} + +// Resume is part of the Resumer interface. +func (r *autoConfigRunner) Resume(ctx context.Context, execCtx interface{}) error { + // The auto config runner is a forever running background job. + // It's always safe to wind the SQL pod down whenever it's + // running, something we indicate through the job's idle + // status. + r.job.MarkIdle(true) + + wait := make(chan struct{}) + + // Note: even though the job registry cancels all running job upon + // shutdown, we find some tests fail unless this job also does its + // own wait. + shutdownCh := execCtx.(sql.JobExecContext).ExecCfg().RPCContext.Stopper.ShouldQuiesce() + + select { + case <-ctx.Done(): + return ctx.Err() + + case <-shutdownCh: + return context.Canceled + + case <-wait: + } + + return nil +} + +func init() { + // Note: we disable tenant cost control because auto-config is used + // by operators and should thus not incur costs (or performance + // penalties) to tenants. + createResumerFn := func(job *jobs.Job, settings *cluster.Settings) jobs.Resumer { + return &autoConfigRunner{job: job} + } + jobs.RegisterConstructor(jobspb.TypeAutoConfigRunner, createResumerFn, + jobs.DisablesTenantCostControl) +} diff --git a/pkg/sql/catalog/bootstrap/metadata.go b/pkg/sql/catalog/bootstrap/metadata.go index 2b8259e06400..a7f035a9d947 100644 --- a/pkg/sql/catalog/bootstrap/metadata.go +++ b/pkg/sql/catalog/bootstrap/metadata.go @@ -455,6 +455,8 @@ func addSystemDescriptorsToSchema(target *MetadataSchema) { target.AddDescriptor(systemschema.SpanStatsBucketsTable) target.AddDescriptor(systemschema.SpanStatsSamplesTable) target.AddDescriptor(systemschema.SpanStatsTenantBoundariesTable) + target.AddDescriptorForSystemTenant(systemschema.SystemTaskPayloadsTable) + target.AddDescriptorForSystemTenant(systemschema.SystemTenantTasksTable) // Adding a new system table? It should be added here to the metadata schema, // and also created as a migration for older clusters. @@ -466,7 +468,7 @@ func addSystemDescriptorsToSchema(target *MetadataSchema) { // NumSystemTablesForSystemTenant is the number of system tables defined on // the system tenant. This constant is only defined to avoid having to manually // update auto stats tests every time a new system table is added. -const NumSystemTablesForSystemTenant = 46 +const NumSystemTablesForSystemTenant = 48 // addSplitIDs adds a split point for each of the PseudoTableIDs to the supplied // MetadataSchema. diff --git a/pkg/sql/catalog/bootstrap/testdata/testdata b/pkg/sql/catalog/bootstrap/testdata/testdata index 06cd1c4ff474..2fec31830476 100644 --- a/pkg/sql/catalog/bootstrap/testdata/testdata +++ b/pkg/sql/catalog/bootstrap/testdata/testdata @@ -1,4 +1,4 @@ -system hash=15942981164d14dd44fe759788c6c62998cfdf3c088d7120395e95ad972ae135 +system hash=642eab4285dee14681ca9c25174565ea8b11a2240c7c63de434a57ce06fece73 ---- [{"key":"04646573632d696467656e","value":"01c801"} ,{"key":"8b"} @@ -49,6 +49,8 @@ system hash=15942981164d14dd44fe759788c6c62998cfdf3c088d7120395e95ad972ae135 ,{"key":"8b89bf8a89","value":"030adc050a127370616e5f73746174735f6275636b6574731837200128013a00423b0a02696410011a0d080e100018003000508617600020002a1167656e5f72616e646f6d5f7575696428293000680070007800800100880100980100422f0a0973616d706c655f696410021a0d080e10001800300050861760002000300068007000780080010088010098010042320a0c73746172745f6b65795f696410031a0d080e10001800300050861760002000300068007000780080010088010098010042300a0a656e645f6b65795f696410041a0d080e100018003000508617600020003000680070007800800100880100980100422d0a08726571756573747310051a0c0801104018003000501460002000300068007000780080010088010098010048065290010a077072696d61727910011801220269642a0973616d706c655f69642a0c73746172745f6b65795f69642a0a656e645f6b65795f69642a087265717565737473300140004a10080010001a00200028003000380040005a0070027003700470057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005a700a156275636b6574735f73616d706c655f69645f69647810021800220973616d706c655f69643002380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2014a0a077072696d61727910001a0269641a0973616d706c655f69641a0c73746172745f6b65795f69641a0a656e645f6b65795f69641a087265717565737473200120022003200420052800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} ,{"key":"8b89c08a89","value":"030a8f040a127370616e5f73746174735f73616d706c65731838200128013a00423b0a02696410011a0d080e100018003000508617600020002a1167656e5f72616e646f6d5f757569642829300068007000780080010088010098010042440a0b73616d706c655f74696d6510021a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d503000680070007800800100880100980100480352680a077072696d61727910011801220269642a0b73616d706c655f74696d65300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00102e001005a740a1773616d706c65735f73616d706c655f74696d655f69647810021801220b73616d706c655f74696d653002380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201220a077072696d61727910001a0269641a0b73616d706c655f74696d65200120022802b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} ,{"key":"8b89c18a89","value":"030a8d030a1c7370616e5f73746174735f74656e616e745f626f756e6461726965731839200128013a00422e0a0974656e616e745f696410011a0c08011040180030005014600020003000680070007800800100880100980100422f0a0a626f756e64617269657310021a0c080810001800300050116000200030006800700078008001008801009801004803526e0a077072696d61727910011801220974656e616e745f69642a0a626f756e646172696573300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201280a077072696d61727910001a0974656e616e745f69641a0a626f756e646172696573200120022802b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} +,{"key":"8b89c28a89","value":"030a95060a0d7461736b5f7061796c6f616473183a200128013a0042270a02696410011a0c0807100018003000501960002000300068007000780080010088010098010042420a076372656174656410021a0d080910001800300050a009600020002a136e6f7728293a3a3a54494d455354414d50545a3000680070007800800100880100980100422a0a056f776e657210031a0c08071000180030005019600020003000680070007800800100880100980100422d0a086f776e65725f696410041a0c080c100018003000501a60002001300068007000780080010088010098010042300a0b6d696e5f76657273696f6e10051a0c0807100018003000501960002000300068007000780080010088010098010042300a0b6465736372697074696f6e10061a0c0807100018003000501960002001300068007000780080010088010098010042290a047479706510071a0c08071000180030005019600020003000680070007800800100880100980100422a0a0576616c756510081a0c08081000180030005011600020003000680070007800800100880100980100480952a8010a077072696d61727910011801220269642a07637265617465642a056f776e65722a086f776e65725f69642a0b6d696e5f76657273696f6e2a0b6465736372697074696f6e2a04747970652a0576616c7565300140004a10080010001a00200028003000380040005a0070027003700470057006700770087a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201620a077072696d61727910001a0269641a07637265617465641a056f776e65721a086f776e65725f69641a0b6d696e5f76657273696f6e1a0b6465736372697074696f6e1a04747970651a0576616c7565200120022003200420052006200720082800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} +,{"key":"8b89c38a89","value":"030ae6050a0c74656e616e745f7461736b73183b200128013a00422e0a0974656e616e745f696410011a0c08011040180030005014600020003000680070007800800100880100980100422b0a0669737375657210021a0c08071000180030005019600020003000680070007800800100880100980100422c0a077461736b5f696410031a0c0801104018003000501460002000300068007000780080010088010098010042420a076372656174656410041a0d080910001800300050a009600020002a136e6f7728293a3a3a54494d455354414d50545a3000680070007800800100880100980100422f0a0a7061796c6f61645f696410051a0c08071000180030005019600020003000680070007800800100880100980100422a0a056f776e657210061a0c08071000180030005019600020003000680070007800800100880100980100422d0a086f776e65725f696410071a0c080c100018003000501a600020013000680070007800800100880100980100480852a7010a077072696d61727910011801220974656e616e745f6964220669737375657222077461736b5f69642a07637265617465642a0a7061796c6f61645f69642a056f776e65722a086f776e65725f69643001300230034000400040004a10080010001a00200028003000380040005a0070047005700670077a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2015d0a077072696d61727910001a0974656e616e745f69641a066973737565721a077461736b5f69641a07637265617465641a0a7061796c6f61645f69641a056f776e65721a086f776e65725f696420012002200320042005200620072800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} ,{"key":"8c"} ,{"key":"8d"} ,{"key":"8d89888a89","value":"031080808040188080808002220308c0702803500058007801"} @@ -126,7 +128,9 @@ system hash=15942981164d14dd44fe759788c6c62998cfdf3c088d7120395e95ad972ae135 ,{"key":"a68989a51273746174656d656e745f646961676e6f73746963735f726571756573747300018c89","value":"0146"} ,{"key":"a68989a51273746174656d656e745f7374617469737469637300018c89","value":"0154"} ,{"key":"a68989a5127461626c655f7374617469737469637300018c89","value":"0128"} +,{"key":"a68989a5127461736b5f7061796c6f61647300018c89","value":"0174"} ,{"key":"a68989a51274656e616e745f73657474696e677300018c89","value":"0164"} +,{"key":"a68989a51274656e616e745f7461736b7300018c89","value":"0176"} ,{"key":"a68989a51274656e616e745f757361676500018c89","value":"015a"} ,{"key":"a68989a51274656e616e747300018c89","value":"0110"} ,{"key":"a68989a5127472616e73616374696f6e5f7374617469737469637300018c89","value":"0156"} @@ -161,6 +165,8 @@ system hash=15942981164d14dd44fe759788c6c62998cfdf3c088d7120395e95ad972ae135 ,{"key":"bf"} ,{"key":"c0"} ,{"key":"c1"} +,{"key":"c2"} +,{"key":"c3"} ] tenant hash=0d0d1ed914ac7eecb9900382aa7a9cca5b2806b3fcf3f6e9b1d499c717d99738 diff --git a/pkg/sql/catalog/catprivilege/system.go b/pkg/sql/catalog/catprivilege/system.go index ec6a241bcf1b..364661db653f 100644 --- a/pkg/sql/catalog/catprivilege/system.go +++ b/pkg/sql/catalog/catprivilege/system.go @@ -60,7 +60,9 @@ var ( catconstants.TenantUsageTableName, catconstants.SQLInstancesTableName, catconstants.SpanConfigurationsTableName, + catconstants.TaskPayloadsTableName, catconstants.TenantSettingsTableName, + catconstants.TenantTasksTableName, catconstants.SpanCountTableName, catconstants.SystemPrivilegeTableName, catconstants.SystemExternalConnectionsTableName, diff --git a/pkg/sql/catalog/internal/catkv/testdata/testdata b/pkg/sql/catalog/internal/catkv/testdata/testdata index 96fb9c0c2d65..c123d43b152c 100644 --- a/pkg/sql/catalog/internal/catkv/testdata/testdata +++ b/pkg/sql/catalog/internal/catkv/testdata/testdata @@ -374,6 +374,12 @@ catalog: descriptor: relation namespace: (1, 29, "span_stats_tenant_boundaries") zone: gc.ttlseconds=3600 + "058": + descriptor: relation + namespace: (1, 29, "task_payloads") + "059": + descriptor: relation + namespace: (1, 29, "tenant_tasks") "100": comments: database: this is the default database diff --git a/pkg/sql/catalog/systemschema/system.go b/pkg/sql/catalog/systemschema/system.go index c8f8253f0783..72afffa5bea2 100644 --- a/pkg/sql/catalog/systemschema/system.go +++ b/pkg/sql/catalog/systemschema/system.go @@ -736,6 +736,33 @@ CREATE TABLE system.external_connections ( FAMILY "primary" (connection_name, created, updated, connection_type, connection_details, owner, owner_id) );` + SystemTenantTasksSchema = ` +CREATE TABLE system.tenant_tasks ( + tenant_id INT8 NOT NULL, + issuer STRING NOT NULL, + task_id INT8 NOT NULL, + created TIMESTAMPTZ NOT NULL DEFAULT now():::TIMESTAMPTZ, + payload_id STRING NOT NULL, + owner STRING NOT NULL, + owner_id OID, + CONSTRAINT "primary" PRIMARY KEY (tenant_id, issuer, task_id), + FAMILY "primary" (tenant_id, issuer, task_id, created, payload_id, owner, owner_id) +);` + + SystemTaskPayloadsSchema = ` +CREATE TABLE system.task_payloads ( + id STRING NOT NULL, + created TIMESTAMPTZ NOT NULL DEFAULT now():::TIMESTAMPTZ, + owner STRING NOT NULL, + owner_id OID, + min_version STRING NOT NULL, + description STRING, + type STRING NOT NULL, + value BYTES NOT NULL, + CONSTRAINT "primary" PRIMARY KEY (id), + FAMILY "primary" (id, created, owner, owner_id, min_version, description, type, value) +);` + SystemJobInfoTableSchema = ` CREATE TABLE system.job_info ( job_id INT8 NOT NULL, @@ -1023,6 +1050,8 @@ func MakeSystemTables() []SystemTable { SpanStatsUniqueKeysTable, SpanStatsBucketsTable, SpanStatsSamplesTable, + SystemTaskPayloadsTable, + SystemTenantTasksTable, } } @@ -2935,6 +2964,71 @@ var ( ), ) + SystemTenantTasksTable = makeSystemTable( + SystemTenantTasksSchema, + systemTable( + catconstants.TenantTasksTableName, + descpb.InvalidID, // dynamically assigned + []descpb.ColumnDescriptor{ + {Name: "tenant_id", ID: 1, Type: types.Int}, + {Name: "issuer", ID: 2, Type: types.String}, + {Name: "task_id", ID: 3, Type: types.Int}, + {Name: "created", ID: 4, Type: types.TimestampTZ, DefaultExpr: &nowTZString}, + {Name: "payload_id", ID: 5, Type: types.String}, + {Name: "owner", ID: 6, Type: types.String}, + {Name: "owner_id", ID: 7, Type: types.Oid, Nullable: true}, + }, + []descpb.ColumnFamilyDescriptor{ + { + Name: "primary", + ID: 0, + ColumnNames: []string{"tenant_id", "issuer", "task_id", "created", "payload_id", "owner", "owner_id"}, + ColumnIDs: []descpb.ColumnID{1, 2, 3, 4, 5, 6, 7}, + }, + }, + descpb.IndexDescriptor{ + Name: "primary", + ID: 1, + Unique: true, + KeyColumnNames: []string{"tenant_id", "issuer", "task_id"}, + KeyColumnDirections: []catenumpb.IndexColumn_Direction{catenumpb.IndexColumn_ASC, catenumpb.IndexColumn_ASC, catenumpb.IndexColumn_ASC}, + KeyColumnIDs: []descpb.ColumnID{1, 2, 3}, + }), + ) + + SystemTaskPayloadsTable = makeSystemTable( + SystemTaskPayloadsSchema, + systemTable( + catconstants.TaskPayloadsTableName, + descpb.InvalidID, // dynamically assigned + []descpb.ColumnDescriptor{ + {Name: "id", ID: 1, Type: types.String}, + {Name: "created", ID: 2, Type: types.TimestampTZ, DefaultExpr: &nowTZString}, + {Name: "owner", ID: 3, Type: types.String}, + {Name: "owner_id", ID: 4, Type: types.Oid, Nullable: true}, + {Name: "min_version", ID: 5, Type: types.String}, + {Name: "description", ID: 6, Type: types.String, Nullable: true}, + {Name: "type", ID: 7, Type: types.String}, + {Name: "value", ID: 8, Type: types.Bytes}, + }, + []descpb.ColumnFamilyDescriptor{ + { + Name: "primary", + ID: 0, + ColumnNames: []string{"id", "created", "owner", "owner_id", "min_version", "description", "type", "value"}, + ColumnIDs: []descpb.ColumnID{1, 2, 3, 4, 5, 6, 7, 8}, + }, + }, + descpb.IndexDescriptor{ + Name: "primary", + ID: 1, + Unique: true, + KeyColumnNames: []string{"id"}, + KeyColumnDirections: singleASC, + KeyColumnIDs: singleID1, + }), + ) + SystemJobInfoTable = makeSystemTable( SystemJobInfoTableSchema, systemTable( diff --git a/pkg/sql/catalog/systemschema_test/testdata/bootstrap b/pkg/sql/catalog/systemschema_test/testdata/bootstrap index da9d47c30eaf..2dfaef3a6b63 100644 --- a/pkg/sql/catalog/systemschema_test/testdata/bootstrap +++ b/pkg/sql/catalog/systemschema_test/testdata/bootstrap @@ -450,6 +450,27 @@ CREATE TABLE public.span_stats_tenant_boundaries ( boundaries BYTES NOT NULL, CONSTRAINT "primary" PRIMARY KEY (tenant_id ASC) ); +CREATE TABLE public.task_payloads ( + id STRING NOT NULL, + created TIMESTAMPTZ NOT NULL DEFAULT now():::TIMESTAMPTZ, + owner STRING NOT NULL, + owner_id OID NULL, + min_version STRING NOT NULL, + description STRING NULL, + type STRING NOT NULL, + value BYTES NOT NULL, + CONSTRAINT "primary" PRIMARY KEY (id ASC) +); +CREATE TABLE public.tenant_tasks ( + tenant_id INT8 NOT NULL, + issuer STRING NOT NULL, + task_id INT8 NOT NULL, + created TIMESTAMPTZ NOT NULL DEFAULT now():::TIMESTAMPTZ, + payload_id STRING NOT NULL, + owner STRING NOT NULL, + owner_id OID NULL, + CONSTRAINT "primary" PRIMARY KEY (tenant_id ASC, issuer ASC, task_id ASC) +); schema_telemetry ---- @@ -494,7 +515,9 @@ schema_telemetry {"table":{"name":"statement_diagnostics_requests","id":35,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"completed","id":2,"type":{"oid":16},"defaultExpr":"false"},{"name":"statement_fingerprint","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"statement_diagnostics_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"requested_at","id":5,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"min_execution_latency","id":6,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}},"nullable":true},{"name":"expires_at","id":7,"type":{"family":"TimestampTZFamily","oid":1184},"nullable":true},{"name":"sampling_probability","id":8,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true}],"nextColumnId":9,"families":[{"name":"primary","columnNames":["id","completed","statement_fingerprint","statement_diagnostics_id","requested_at","min_execution_latency","expires_at","sampling_probability"],"columnIds":[1,2,3,4,5,6,7,8]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["completed","statement_fingerprint","statement_diagnostics_id","requested_at","min_execution_latency","expires_at","sampling_probability"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7,8],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"completed_idx","id":2,"version":3,"keyColumnNames":["completed","id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["statement_fingerprint","min_execution_latency","expires_at","sampling_probability"],"keyColumnIds":[2,1],"storeColumnIds":[3,6,7,8],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"sampling_probability BETWEEN _:::FLOAT8 AND _:::FLOAT8","name":"check_sampling_probability","columnIds":[8],"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} {"table":{"name":"statement_statistics","id":42,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"aggregated_ts","id":1,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"fingerprint_id","id":2,"type":{"family":"BytesFamily","oid":17}},{"name":"transaction_fingerprint_id","id":3,"type":{"family":"BytesFamily","oid":17}},{"name":"plan_hash","id":4,"type":{"family":"BytesFamily","oid":17}},{"name":"app_name","id":5,"type":{"family":"StringFamily","oid":25}},{"name":"node_id","id":6,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"agg_interval","id":7,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}}},{"name":"metadata","id":8,"type":{"family":"JsonFamily","oid":3802}},{"name":"statistics","id":9,"type":{"family":"JsonFamily","oid":3802}},{"name":"plan","id":10,"type":{"family":"JsonFamily","oid":3802}},{"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","id":11,"type":{"family":"IntFamily","width":32,"oid":23},"hidden":true,"computeExpr":"mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id, plan_hash, transaction_fingerprint_id)), _:::INT8)"},{"name":"index_recommendations","id":12,"type":{"family":"ArrayFamily","arrayElemType":"StringFamily","oid":1009,"arrayContents":{"family":"StringFamily","oid":25}},"defaultExpr":"ARRAY[]:::STRING[]"},{"name":"indexes_usage","id":13,"type":{"family":"JsonFamily","oid":3802},"nullable":true,"computeExpr":"(statistics-\u003e'_':::STRING)-\u003e'_':::STRING","virtual":true}],"nextColumnId":14,"families":[{"name":"primary","columnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","aggregated_ts","fingerprint_id","transaction_fingerprint_id","plan_hash","app_name","node_id","agg_interval","metadata","statistics","plan","index_recommendations"],"columnIds":[11,1,2,3,4,5,6,7,8,9,10,12]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","aggregated_ts","fingerprint_id","transaction_fingerprint_id","plan_hash","app_name","node_id"],"keyColumnDirections":["ASC","ASC","ASC","ASC","ASC","ASC","ASC"],"storeColumnNames":["agg_interval","metadata","statistics","plan","index_recommendations"],"keyColumnIds":[11,1,2,3,4,5,6],"storeColumnIds":[7,8,9,10,12],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{"isSharded":true,"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","shardBuckets":8,"columnNames":["aggregated_ts","app_name","fingerprint_id","node_id","plan_hash","transaction_fingerprint_id"]},"geoConfig":{},"constraintId":1},"indexes":[{"name":"fingerprint_stats_idx","id":2,"version":3,"keyColumnNames":["fingerprint_id","transaction_fingerprint_id"],"keyColumnDirections":["ASC","ASC"],"keyColumnIds":[2,3],"keySuffixColumnIds":[11,1,4,5,6],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"indexes_usage_idx","id":3,"version":3,"keyColumnNames":["indexes_usage"],"keyColumnDirections":["ASC"],"invertedColumnKinds":["DEFAULT"],"keyColumnIds":[13],"keySuffixColumnIds":[11,1,2,3,4,5,6],"foreignKey":{},"interleave":{},"partitioning":{},"type":"INVERTED","sharded":{},"geoConfig":{}}],"nextIndexId":4,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8 IN (_:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8)","name":"check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_plan_hash_transaction_fingerprint_id_shard_8","columnIds":[11],"fromHashShardedColumn":true,"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} {"table":{"name":"table_statistics","id":20,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"tableID","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"statisticID","id":2,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"name","id":3,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"columnIDs","id":4,"type":{"family":"ArrayFamily","width":64,"arrayElemType":"IntFamily","oid":1016,"arrayContents":{"family":"IntFamily","width":64,"oid":20}}},{"name":"createdAt","id":5,"type":{"family":"TimestampFamily","oid":1114},"defaultExpr":"now():::TIMESTAMP"},{"name":"rowCount","id":6,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"distinctCount","id":7,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"nullCount","id":8,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"histogram","id":9,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"avgSize","id":10,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"_:::INT8"},{"name":"partialPredicate","id":11,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"fullStatisticID","id":12,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true}],"nextColumnId":13,"families":[{"name":"fam_0_tableID_statisticID_name_columnIDs_createdAt_rowCount_distinctCount_nullCount_histogram","columnNames":["tableID","statisticID","name","columnIDs","createdAt","rowCount","distinctCount","nullCount","histogram","avgSize","partialPredicate","fullStatisticID"],"columnIds":[1,2,3,4,5,6,7,8,9,10,11,12]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["tableID","statisticID"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["name","columnIDs","createdAt","rowCount","distinctCount","nullCount","histogram","avgSize","partialPredicate","fullStatisticID"],"keyColumnIds":[1,2],"storeColumnIds":[3,4,5,6,7,8,9,10,11,12],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} +{"table":{"name":"task_payloads","id":58,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"StringFamily","oid":25}},{"name":"created","id":2,"type":{"family":"TimestampTZFamily","oid":1184},"defaultExpr":"now():::TIMESTAMPTZ"},{"name":"owner","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"owner_id","id":4,"type":{"family":"OidFamily","oid":26},"nullable":true},{"name":"min_version","id":5,"type":{"family":"StringFamily","oid":25}},{"name":"description","id":6,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"type","id":7,"type":{"family":"StringFamily","oid":25}},{"name":"value","id":8,"type":{"family":"BytesFamily","oid":17}}],"nextColumnId":9,"families":[{"name":"primary","columnNames":["id","created","owner","owner_id","min_version","description","type","value"],"columnIds":[1,2,3,4,5,6,7,8]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["created","owner","owner_id","min_version","description","type","value"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7,8],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"tenant_settings","id":50,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"tenant_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"name","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"value","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"last_updated","id":4,"type":{"family":"TimestampFamily","oid":1114},"defaultExpr":"now():::TIMESTAMP"},{"name":"value_type","id":5,"type":{"family":"StringFamily","oid":25}},{"name":"reason","id":6,"type":{"family":"StringFamily","oid":25},"nullable":true}],"nextColumnId":7,"families":[{"name":"fam_0_tenant_id_name_value_last_updated_value_type_reason","columnNames":["tenant_id","name","value","last_updated","value_type","reason"],"columnIds":[1,2,3,4,5,6]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["tenant_id","name"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["value","last_updated","value_type","reason"],"keyColumnIds":[1,2],"storeColumnIds":[3,4,5,6],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} +{"table":{"name":"tenant_tasks","id":59,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"tenant_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"issuer","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"task_id","id":3,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"created","id":4,"type":{"family":"TimestampTZFamily","oid":1184},"defaultExpr":"now():::TIMESTAMPTZ"},{"name":"payload_id","id":5,"type":{"family":"StringFamily","oid":25}},{"name":"owner","id":6,"type":{"family":"StringFamily","oid":25}},{"name":"owner_id","id":7,"type":{"family":"OidFamily","oid":26},"nullable":true}],"nextColumnId":8,"families":[{"name":"primary","columnNames":["tenant_id","issuer","task_id","created","payload_id","owner","owner_id"],"columnIds":[1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["tenant_id","issuer","task_id"],"keyColumnDirections":["ASC","ASC","ASC"],"storeColumnNames":["created","payload_id","owner","owner_id"],"keyColumnIds":[1,2,3],"storeColumnIds":[4,5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"tenant_usage","id":45,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"tenant_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"instance_id","id":2,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"next_instance_id","id":3,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"last_update","id":4,"type":{"family":"TimestampFamily","oid":1114}},{"name":"ru_burst_limit","id":5,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"ru_refill_rate","id":6,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"ru_current","id":7,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"current_share_sum","id":8,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"total_consumption","id":9,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"instance_lease","id":10,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"instance_seq","id":11,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"instance_shares","id":12,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true}],"nextColumnId":13,"families":[{"name":"primary","columnNames":["tenant_id","instance_id","next_instance_id","last_update","ru_burst_limit","ru_refill_rate","ru_current","current_share_sum","total_consumption","instance_lease","instance_seq","instance_shares"],"columnIds":[1,2,3,4,5,6,7,8,9,10,11,12]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["tenant_id","instance_id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["next_instance_id","last_update","ru_burst_limit","ru_refill_rate","ru_current","current_share_sum","total_consumption","instance_lease","instance_seq","instance_shares"],"keyColumnIds":[1,2],"storeColumnIds":[3,4,5,6,7,8,9,10,11,12],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"tenants","id":8,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"active","id":2,"type":{"oid":16},"defaultExpr":"true","hidden":true},{"name":"info","id":3,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"name","id":4,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"data_state","id":5,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"service_mode","id":6,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true}],"nextColumnId":7,"families":[{"name":"primary","columnNames":["id","active","info","name","data_state","service_mode"],"columnIds":[1,2,3,4,5,6]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["active","info","name","data_state","service_mode"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":2},"indexes":[{"name":"tenants_name_idx","id":2,"unique":true,"version":3,"keyColumnNames":["name"],"keyColumnDirections":["ASC"],"keyColumnIds":[4],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"constraintId":1},{"name":"tenants_service_mode_idx","id":3,"version":3,"keyColumnNames":["service_mode"],"keyColumnDirections":["ASC"],"keyColumnIds":[6],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":4,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} {"table":{"name":"transaction_statistics","id":43,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"aggregated_ts","id":1,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"fingerprint_id","id":2,"type":{"family":"BytesFamily","oid":17}},{"name":"app_name","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"node_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"agg_interval","id":5,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}}},{"name":"metadata","id":6,"type":{"family":"JsonFamily","oid":3802}},{"name":"statistics","id":7,"type":{"family":"JsonFamily","oid":3802}},{"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","id":8,"type":{"family":"IntFamily","width":32,"oid":23},"hidden":true,"computeExpr":"mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id)), _:::INT8)"}],"nextColumnId":9,"families":[{"name":"primary","columnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id","agg_interval","metadata","statistics"],"columnIds":[8,1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id"],"keyColumnDirections":["ASC","ASC","ASC","ASC","ASC"],"storeColumnNames":["agg_interval","metadata","statistics"],"keyColumnIds":[8,1,2,3,4],"storeColumnIds":[5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{"isSharded":true,"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","shardBuckets":8,"columnNames":["aggregated_ts","app_name","fingerprint_id","node_id"]},"geoConfig":{},"constraintId":1},"indexes":[{"name":"fingerprint_stats_idx","id":2,"version":3,"keyColumnNames":["fingerprint_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[8,1,3,4],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8 IN (_:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8)","name":"check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","columnIds":[8],"fromHashShardedColumn":true,"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} @@ -507,26 +530,26 @@ schema_telemetry schema_telemetry snapshot_id=7cd8a9ae-f35c-4cd2-970a-757174600874 max_records=10 ---- +{"database":{"name":"postgres","id":102,"modificationTime":{"wallTime":"0"},"version":"1","privileges":{"users":[{"userProto":"admin","privileges":"2","withGrantOption":"2"},{"userProto":"public","privileges":"2048"},{"userProto":"root","privileges":"2","withGrantOption":"2"}],"ownerProto":"root","version":2},"schemas":{"public":{"id":103}},"defaultPrivileges":{}}} {"table":{"name":"descriptor","id":3,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"descriptor","id":2,"type":{"family":"BytesFamily","oid":17},"nullable":true}],"nextColumnId":3,"families":[{"name":"primary","columnNames":["id"],"columnIds":[1]},{"name":"fam_2_descriptor","id":2,"columnNames":["descriptor"],"columnIds":[2],"defaultColumnId":2}],"nextFamilyId":3,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["descriptor"],"keyColumnIds":[1],"storeColumnIds":[2],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} -{"table":{"name":"scheduled_jobs","id":37,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"schedule_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"schedule_name","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"created","id":3,"type":{"family":"TimestampTZFamily","oid":1184},"defaultExpr":"now():::TIMESTAMPTZ"},{"name":"owner","id":4,"type":{"family":"StringFamily","oid":25}},{"name":"next_run","id":5,"type":{"family":"TimestampTZFamily","oid":1184},"nullable":true},{"name":"schedule_state","id":6,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"schedule_expr","id":7,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"schedule_details","id":8,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"executor_type","id":9,"type":{"family":"StringFamily","oid":25}},{"name":"execution_args","id":10,"type":{"family":"BytesFamily","oid":17}}],"nextColumnId":11,"families":[{"name":"sched","columnNames":["schedule_id","next_run","schedule_state"],"columnIds":[1,5,6]},{"name":"other","id":1,"columnNames":["schedule_name","created","owner","schedule_expr","schedule_details","executor_type","execution_args"],"columnIds":[2,3,4,7,8,9,10]}],"nextFamilyId":2,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["schedule_id"],"keyColumnDirections":["ASC"],"storeColumnNames":["schedule_name","created","owner","next_run","schedule_state","schedule_expr","schedule_details","executor_type","execution_args"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7,8,9,10],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"next_run_idx","id":2,"version":3,"keyColumnNames":["next_run"],"keyColumnDirections":["ASC"],"keyColumnIds":[5],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} +{"table":{"name":"replication_constraint_stats","id":25,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"zone_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"subzone_id","id":2,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"type","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"config","id":4,"type":{"family":"StringFamily","oid":25}},{"name":"report_id","id":5,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"violation_start","id":6,"type":{"family":"TimestampTZFamily","oid":1184},"nullable":true},{"name":"violating_ranges","id":7,"type":{"family":"IntFamily","width":64,"oid":20}}],"nextColumnId":8,"families":[{"name":"primary","columnNames":["zone_id","subzone_id","type","config","report_id","violation_start","violating_ranges"],"columnIds":[1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["zone_id","subzone_id","type","config"],"keyColumnDirections":["ASC","ASC","ASC","ASC"],"storeColumnNames":["report_id","violation_start","violating_ranges"],"keyColumnIds":[1,2,3,4],"storeColumnIds":[5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"settings","id":6,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"name","id":1,"type":{"family":"StringFamily","oid":25}},{"name":"value","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"lastUpdated","id":3,"type":{"family":"TimestampFamily","oid":1114},"defaultExpr":"now():::TIMESTAMP"},{"name":"valueType","id":4,"type":{"family":"StringFamily","oid":25},"nullable":true}],"nextColumnId":5,"families":[{"name":"fam_0_name_value_lastUpdated_valueType","columnNames":["name","value","lastUpdated","valueType"],"columnIds":[1,2,3,4]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["name"],"keyColumnDirections":["ASC"],"storeColumnNames":["value","lastUpdated","valueType"],"keyColumnIds":[1],"storeColumnIds":[2,3,4],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} -{"table":{"name":"span_stats_samples","id":56,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"UuidFamily","oid":2950},"defaultExpr":"gen_random_uuid()"},{"name":"sample_time","id":2,"type":{"family":"TimestampFamily","oid":1114},"defaultExpr":"now():::TIMESTAMP"}],"nextColumnId":3,"families":[{"name":"primary","columnNames":["id","sample_time"],"columnIds":[1,2],"defaultColumnId":2}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["sample_time"],"keyColumnIds":[1],"storeColumnIds":[2],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":2},"indexes":[{"name":"samples_sample_time_idx","id":2,"unique":true,"version":3,"keyColumnNames":["sample_time"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"constraintId":1}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} -{"table":{"name":"span_stats_tenant_boundaries","id":57,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"tenant_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"boundaries","id":2,"type":{"family":"BytesFamily","oid":17}}],"nextColumnId":3,"families":[{"name":"primary","columnNames":["tenant_id","boundaries"],"columnIds":[1,2],"defaultColumnId":2}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["tenant_id"],"keyColumnDirections":["ASC"],"storeColumnNames":["boundaries"],"keyColumnIds":[1],"storeColumnIds":[2],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} +{"table":{"name":"span_stats_buckets","id":55,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"UuidFamily","oid":2950},"defaultExpr":"gen_random_uuid()"},{"name":"sample_id","id":2,"type":{"family":"UuidFamily","oid":2950}},{"name":"start_key_id","id":3,"type":{"family":"UuidFamily","oid":2950}},{"name":"end_key_id","id":4,"type":{"family":"UuidFamily","oid":2950}},{"name":"requests","id":5,"type":{"family":"IntFamily","width":64,"oid":20}}],"nextColumnId":6,"families":[{"name":"primary","columnNames":["id","sample_id","start_key_id","end_key_id","requests"],"columnIds":[1,2,3,4,5]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["sample_id","start_key_id","end_key_id","requests"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"buckets_sample_id_idx","id":2,"version":3,"keyColumnNames":["sample_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"span_stats_unique_keys","id":54,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"UuidFamily","oid":2950},"defaultExpr":"gen_random_uuid()"},{"name":"key_bytes","id":2,"type":{"family":"BytesFamily","oid":17},"nullable":true}],"nextColumnId":3,"families":[{"name":"primary","columnNames":["id","key_bytes"],"columnIds":[1,2],"defaultColumnId":2}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["key_bytes"],"keyColumnIds":[1],"storeColumnIds":[2],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":2},"indexes":[{"name":"unique_keys_key_bytes_idx","id":2,"unique":true,"version":3,"keyColumnNames":["key_bytes"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"constraintId":1}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} -{"table":{"name":"table_statistics","id":20,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"tableID","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"statisticID","id":2,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"name","id":3,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"columnIDs","id":4,"type":{"family":"ArrayFamily","width":64,"arrayElemType":"IntFamily","oid":1016,"arrayContents":{"family":"IntFamily","width":64,"oid":20}}},{"name":"createdAt","id":5,"type":{"family":"TimestampFamily","oid":1114},"defaultExpr":"now():::TIMESTAMP"},{"name":"rowCount","id":6,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"distinctCount","id":7,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"nullCount","id":8,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"histogram","id":9,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"avgSize","id":10,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"_:::INT8"},{"name":"partialPredicate","id":11,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"fullStatisticID","id":12,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true}],"nextColumnId":13,"families":[{"name":"fam_0_tableID_statisticID_name_columnIDs_createdAt_rowCount_distinctCount_nullCount_histogram","columnNames":["tableID","statisticID","name","columnIDs","createdAt","rowCount","distinctCount","nullCount","histogram","avgSize","partialPredicate","fullStatisticID"],"columnIds":[1,2,3,4,5,6,7,8,9,10,11,12]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["tableID","statisticID"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["name","columnIDs","createdAt","rowCount","distinctCount","nullCount","histogram","avgSize","partialPredicate","fullStatisticID"],"keyColumnIds":[1,2],"storeColumnIds":[3,4,5,6,7,8,9,10,11,12],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} -{"table":{"name":"tenant_usage","id":45,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"tenant_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"instance_id","id":2,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"next_instance_id","id":3,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"last_update","id":4,"type":{"family":"TimestampFamily","oid":1114}},{"name":"ru_burst_limit","id":5,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"ru_refill_rate","id":6,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"ru_current","id":7,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"current_share_sum","id":8,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"total_consumption","id":9,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"instance_lease","id":10,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"instance_seq","id":11,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"instance_shares","id":12,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true}],"nextColumnId":13,"families":[{"name":"primary","columnNames":["tenant_id","instance_id","next_instance_id","last_update","ru_burst_limit","ru_refill_rate","ru_current","current_share_sum","total_consumption","instance_lease","instance_seq","instance_shares"],"columnIds":[1,2,3,4,5,6,7,8,9,10,11,12]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["tenant_id","instance_id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["next_instance_id","last_update","ru_burst_limit","ru_refill_rate","ru_current","current_share_sum","total_consumption","instance_lease","instance_seq","instance_shares"],"keyColumnIds":[1,2],"storeColumnIds":[3,4,5,6,7,8,9,10,11,12],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} -{"table":{"name":"users","id":4,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"username","id":1,"type":{"family":"StringFamily","oid":25}},{"name":"hashedPassword","id":2,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"isRole","id":3,"type":{"oid":16},"defaultExpr":"false"},{"name":"user_id","id":4,"type":{"family":"OidFamily","oid":26}}],"nextColumnId":5,"families":[{"name":"primary","columnNames":["username","user_id"],"columnIds":[1,4],"defaultColumnId":4},{"name":"fam_2_hashedPassword","id":2,"columnNames":["hashedPassword"],"columnIds":[2],"defaultColumnId":2},{"name":"fam_3_isRole","id":3,"columnNames":["isRole"],"columnIds":[3],"defaultColumnId":3}],"nextFamilyId":4,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["username"],"keyColumnDirections":["ASC"],"storeColumnNames":["hashedPassword","isRole","user_id"],"keyColumnIds":[1],"storeColumnIds":[2,3,4],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":2},"indexes":[{"name":"users_user_id_idx","id":2,"unique":true,"version":3,"keyColumnNames":["user_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[4],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"constraintId":1}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} -{"table":{"name":"zones","id":5,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"config","id":2,"type":{"family":"BytesFamily","oid":17},"nullable":true}],"nextColumnId":3,"families":[{"name":"primary","columnNames":["id"],"columnIds":[1]},{"name":"fam_2_config","id":2,"columnNames":["config"],"columnIds":[2],"defaultColumnId":2}],"nextFamilyId":3,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["config"],"keyColumnIds":[1],"storeColumnIds":[2],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} +{"table":{"name":"sql_instances","id":46,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"addr","id":2,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"session_id","id":3,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"locality","id":4,"type":{"family":"JsonFamily","oid":3802},"nullable":true},{"name":"sql_addr","id":5,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"crdb_region","id":6,"type":{"family":"BytesFamily","oid":17}}],"nextColumnId":7,"families":[{"name":"primary","columnNames":["id","addr","session_id","locality","sql_addr","crdb_region"],"columnIds":[1,2,3,4,5,6]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":2,"unique":true,"version":4,"keyColumnNames":["crdb_region","id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["addr","session_id","locality","sql_addr"],"keyColumnIds":[6,1],"storeColumnIds":[2,3,4,5],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} +{"table":{"name":"statement_diagnostics","id":36,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"statement_fingerprint","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"statement","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"collected_at","id":4,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"trace","id":5,"type":{"family":"JsonFamily","oid":3802},"nullable":true},{"name":"bundle_chunks","id":6,"type":{"family":"ArrayFamily","width":64,"arrayElemType":"IntFamily","oid":1016,"arrayContents":{"family":"IntFamily","width":64,"oid":20}},"nullable":true},{"name":"error","id":7,"type":{"family":"StringFamily","oid":25},"nullable":true}],"nextColumnId":8,"families":[{"name":"primary","columnNames":["id","statement_fingerprint","statement","collected_at","trace","bundle_chunks","error"],"columnIds":[1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["statement_fingerprint","statement","collected_at","trace","bundle_chunks","error"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} +{"table":{"name":"statement_diagnostics_requests","id":35,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"completed","id":2,"type":{"oid":16},"defaultExpr":"false"},{"name":"statement_fingerprint","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"statement_diagnostics_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"requested_at","id":5,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"min_execution_latency","id":6,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}},"nullable":true},{"name":"expires_at","id":7,"type":{"family":"TimestampTZFamily","oid":1184},"nullable":true},{"name":"sampling_probability","id":8,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true}],"nextColumnId":9,"families":[{"name":"primary","columnNames":["id","completed","statement_fingerprint","statement_diagnostics_id","requested_at","min_execution_latency","expires_at","sampling_probability"],"columnIds":[1,2,3,4,5,6,7,8]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["completed","statement_fingerprint","statement_diagnostics_id","requested_at","min_execution_latency","expires_at","sampling_probability"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7,8],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"completed_idx","id":2,"version":3,"keyColumnNames":["completed","id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["statement_fingerprint","min_execution_latency","expires_at","sampling_probability"],"keyColumnIds":[2,1],"storeColumnIds":[3,6,7,8],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"sampling_probability BETWEEN _:::FLOAT8 AND _:::FLOAT8","name":"check_sampling_probability","columnIds":[8],"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} +{"table":{"name":"transaction_statistics","id":43,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"aggregated_ts","id":1,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"fingerprint_id","id":2,"type":{"family":"BytesFamily","oid":17}},{"name":"app_name","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"node_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"agg_interval","id":5,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}}},{"name":"metadata","id":6,"type":{"family":"JsonFamily","oid":3802}},{"name":"statistics","id":7,"type":{"family":"JsonFamily","oid":3802}},{"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","id":8,"type":{"family":"IntFamily","width":32,"oid":23},"hidden":true,"computeExpr":"mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id)), _:::INT8)"}],"nextColumnId":9,"families":[{"name":"primary","columnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id","agg_interval","metadata","statistics"],"columnIds":[8,1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id"],"keyColumnDirections":["ASC","ASC","ASC","ASC","ASC"],"storeColumnNames":["agg_interval","metadata","statistics"],"keyColumnIds":[8,1,2,3,4],"storeColumnIds":[5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{"isSharded":true,"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","shardBuckets":8,"columnNames":["aggregated_ts","app_name","fingerprint_id","node_id"]},"geoConfig":{},"constraintId":1},"indexes":[{"name":"fingerprint_stats_idx","id":2,"version":3,"keyColumnNames":["fingerprint_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[8,1,3,4],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8 IN (_:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8)","name":"check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","columnIds":[8],"fromHashShardedColumn":true,"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} schema_telemetry snapshot_id=7cd8a9ae-f35c-4cd2-970a-757174600874 max_records=10 ---- +{"database":{"name":"postgres","id":102,"modificationTime":{"wallTime":"0"},"version":"1","privileges":{"users":[{"userProto":"admin","privileges":"2","withGrantOption":"2"},{"userProto":"public","privileges":"2048"},{"userProto":"root","privileges":"2","withGrantOption":"2"}],"ownerProto":"root","version":2},"schemas":{"public":{"id":103}},"defaultPrivileges":{}}} {"table":{"name":"descriptor","id":3,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"descriptor","id":2,"type":{"family":"BytesFamily","oid":17},"nullable":true}],"nextColumnId":3,"families":[{"name":"primary","columnNames":["id"],"columnIds":[1]},{"name":"fam_2_descriptor","id":2,"columnNames":["descriptor"],"columnIds":[2],"defaultColumnId":2}],"nextFamilyId":3,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["descriptor"],"keyColumnIds":[1],"storeColumnIds":[2],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} -{"table":{"name":"scheduled_jobs","id":37,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"schedule_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"schedule_name","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"created","id":3,"type":{"family":"TimestampTZFamily","oid":1184},"defaultExpr":"now():::TIMESTAMPTZ"},{"name":"owner","id":4,"type":{"family":"StringFamily","oid":25}},{"name":"next_run","id":5,"type":{"family":"TimestampTZFamily","oid":1184},"nullable":true},{"name":"schedule_state","id":6,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"schedule_expr","id":7,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"schedule_details","id":8,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"executor_type","id":9,"type":{"family":"StringFamily","oid":25}},{"name":"execution_args","id":10,"type":{"family":"BytesFamily","oid":17}}],"nextColumnId":11,"families":[{"name":"sched","columnNames":["schedule_id","next_run","schedule_state"],"columnIds":[1,5,6]},{"name":"other","id":1,"columnNames":["schedule_name","created","owner","schedule_expr","schedule_details","executor_type","execution_args"],"columnIds":[2,3,4,7,8,9,10]}],"nextFamilyId":2,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["schedule_id"],"keyColumnDirections":["ASC"],"storeColumnNames":["schedule_name","created","owner","next_run","schedule_state","schedule_expr","schedule_details","executor_type","execution_args"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7,8,9,10],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"next_run_idx","id":2,"version":3,"keyColumnNames":["next_run"],"keyColumnDirections":["ASC"],"keyColumnIds":[5],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} +{"table":{"name":"replication_constraint_stats","id":25,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"zone_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"subzone_id","id":2,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"type","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"config","id":4,"type":{"family":"StringFamily","oid":25}},{"name":"report_id","id":5,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"violation_start","id":6,"type":{"family":"TimestampTZFamily","oid":1184},"nullable":true},{"name":"violating_ranges","id":7,"type":{"family":"IntFamily","width":64,"oid":20}}],"nextColumnId":8,"families":[{"name":"primary","columnNames":["zone_id","subzone_id","type","config","report_id","violation_start","violating_ranges"],"columnIds":[1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["zone_id","subzone_id","type","config"],"keyColumnDirections":["ASC","ASC","ASC","ASC"],"storeColumnNames":["report_id","violation_start","violating_ranges"],"keyColumnIds":[1,2,3,4],"storeColumnIds":[5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"settings","id":6,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"name","id":1,"type":{"family":"StringFamily","oid":25}},{"name":"value","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"lastUpdated","id":3,"type":{"family":"TimestampFamily","oid":1114},"defaultExpr":"now():::TIMESTAMP"},{"name":"valueType","id":4,"type":{"family":"StringFamily","oid":25},"nullable":true}],"nextColumnId":5,"families":[{"name":"fam_0_name_value_lastUpdated_valueType","columnNames":["name","value","lastUpdated","valueType"],"columnIds":[1,2,3,4]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["name"],"keyColumnDirections":["ASC"],"storeColumnNames":["value","lastUpdated","valueType"],"keyColumnIds":[1],"storeColumnIds":[2,3,4],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} -{"table":{"name":"span_stats_samples","id":56,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"UuidFamily","oid":2950},"defaultExpr":"gen_random_uuid()"},{"name":"sample_time","id":2,"type":{"family":"TimestampFamily","oid":1114},"defaultExpr":"now():::TIMESTAMP"}],"nextColumnId":3,"families":[{"name":"primary","columnNames":["id","sample_time"],"columnIds":[1,2],"defaultColumnId":2}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["sample_time"],"keyColumnIds":[1],"storeColumnIds":[2],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":2},"indexes":[{"name":"samples_sample_time_idx","id":2,"unique":true,"version":3,"keyColumnNames":["sample_time"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"constraintId":1}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} -{"table":{"name":"span_stats_tenant_boundaries","id":57,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"tenant_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"boundaries","id":2,"type":{"family":"BytesFamily","oid":17}}],"nextColumnId":3,"families":[{"name":"primary","columnNames":["tenant_id","boundaries"],"columnIds":[1,2],"defaultColumnId":2}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["tenant_id"],"keyColumnDirections":["ASC"],"storeColumnNames":["boundaries"],"keyColumnIds":[1],"storeColumnIds":[2],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} +{"table":{"name":"span_stats_buckets","id":55,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"UuidFamily","oid":2950},"defaultExpr":"gen_random_uuid()"},{"name":"sample_id","id":2,"type":{"family":"UuidFamily","oid":2950}},{"name":"start_key_id","id":3,"type":{"family":"UuidFamily","oid":2950}},{"name":"end_key_id","id":4,"type":{"family":"UuidFamily","oid":2950}},{"name":"requests","id":5,"type":{"family":"IntFamily","width":64,"oid":20}}],"nextColumnId":6,"families":[{"name":"primary","columnNames":["id","sample_id","start_key_id","end_key_id","requests"],"columnIds":[1,2,3,4,5]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["sample_id","start_key_id","end_key_id","requests"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"buckets_sample_id_idx","id":2,"version":3,"keyColumnNames":["sample_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} {"table":{"name":"span_stats_unique_keys","id":54,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"UuidFamily","oid":2950},"defaultExpr":"gen_random_uuid()"},{"name":"key_bytes","id":2,"type":{"family":"BytesFamily","oid":17},"nullable":true}],"nextColumnId":3,"families":[{"name":"primary","columnNames":["id","key_bytes"],"columnIds":[1,2],"defaultColumnId":2}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["key_bytes"],"keyColumnIds":[1],"storeColumnIds":[2],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":2},"indexes":[{"name":"unique_keys_key_bytes_idx","id":2,"unique":true,"version":3,"keyColumnNames":["key_bytes"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"constraintId":1}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} -{"table":{"name":"table_statistics","id":20,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"tableID","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"statisticID","id":2,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"name","id":3,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"columnIDs","id":4,"type":{"family":"ArrayFamily","width":64,"arrayElemType":"IntFamily","oid":1016,"arrayContents":{"family":"IntFamily","width":64,"oid":20}}},{"name":"createdAt","id":5,"type":{"family":"TimestampFamily","oid":1114},"defaultExpr":"now():::TIMESTAMP"},{"name":"rowCount","id":6,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"distinctCount","id":7,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"nullCount","id":8,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"histogram","id":9,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"avgSize","id":10,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"_:::INT8"},{"name":"partialPredicate","id":11,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"fullStatisticID","id":12,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true}],"nextColumnId":13,"families":[{"name":"fam_0_tableID_statisticID_name_columnIDs_createdAt_rowCount_distinctCount_nullCount_histogram","columnNames":["tableID","statisticID","name","columnIDs","createdAt","rowCount","distinctCount","nullCount","histogram","avgSize","partialPredicate","fullStatisticID"],"columnIds":[1,2,3,4,5,6,7,8,9,10,11,12]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["tableID","statisticID"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["name","columnIDs","createdAt","rowCount","distinctCount","nullCount","histogram","avgSize","partialPredicate","fullStatisticID"],"keyColumnIds":[1,2],"storeColumnIds":[3,4,5,6,7,8,9,10,11,12],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} -{"table":{"name":"tenant_usage","id":45,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"tenant_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"instance_id","id":2,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"next_instance_id","id":3,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"last_update","id":4,"type":{"family":"TimestampFamily","oid":1114}},{"name":"ru_burst_limit","id":5,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"ru_refill_rate","id":6,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"ru_current","id":7,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"current_share_sum","id":8,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true},{"name":"total_consumption","id":9,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"instance_lease","id":10,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"instance_seq","id":11,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"instance_shares","id":12,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true}],"nextColumnId":13,"families":[{"name":"primary","columnNames":["tenant_id","instance_id","next_instance_id","last_update","ru_burst_limit","ru_refill_rate","ru_current","current_share_sum","total_consumption","instance_lease","instance_seq","instance_shares"],"columnIds":[1,2,3,4,5,6,7,8,9,10,11,12]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["tenant_id","instance_id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["next_instance_id","last_update","ru_burst_limit","ru_refill_rate","ru_current","current_share_sum","total_consumption","instance_lease","instance_seq","instance_shares"],"keyColumnIds":[1,2],"storeColumnIds":[3,4,5,6,7,8,9,10,11,12],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} -{"table":{"name":"users","id":4,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"username","id":1,"type":{"family":"StringFamily","oid":25}},{"name":"hashedPassword","id":2,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"isRole","id":3,"type":{"oid":16},"defaultExpr":"false"},{"name":"user_id","id":4,"type":{"family":"OidFamily","oid":26}}],"nextColumnId":5,"families":[{"name":"primary","columnNames":["username","user_id"],"columnIds":[1,4],"defaultColumnId":4},{"name":"fam_2_hashedPassword","id":2,"columnNames":["hashedPassword"],"columnIds":[2],"defaultColumnId":2},{"name":"fam_3_isRole","id":3,"columnNames":["isRole"],"columnIds":[3],"defaultColumnId":3}],"nextFamilyId":4,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["username"],"keyColumnDirections":["ASC"],"storeColumnNames":["hashedPassword","isRole","user_id"],"keyColumnIds":[1],"storeColumnIds":[2,3,4],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":2},"indexes":[{"name":"users_user_id_idx","id":2,"unique":true,"version":3,"keyColumnNames":["user_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[4],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"constraintId":1}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} -{"table":{"name":"zones","id":5,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"config","id":2,"type":{"family":"BytesFamily","oid":17},"nullable":true}],"nextColumnId":3,"families":[{"name":"primary","columnNames":["id"],"columnIds":[1]},{"name":"fam_2_config","id":2,"columnNames":["config"],"columnIds":[2],"defaultColumnId":2}],"nextFamilyId":3,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["config"],"keyColumnIds":[1],"storeColumnIds":[2],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} +{"table":{"name":"sql_instances","id":46,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"addr","id":2,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"session_id","id":3,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"locality","id":4,"type":{"family":"JsonFamily","oid":3802},"nullable":true},{"name":"sql_addr","id":5,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"crdb_region","id":6,"type":{"family":"BytesFamily","oid":17}}],"nextColumnId":7,"families":[{"name":"primary","columnNames":["id","addr","session_id","locality","sql_addr","crdb_region"],"columnIds":[1,2,3,4,5,6]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":2,"unique":true,"version":4,"keyColumnNames":["crdb_region","id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["addr","session_id","locality","sql_addr"],"keyColumnIds":[6,1],"storeColumnIds":[2,3,4,5],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} +{"table":{"name":"statement_diagnostics","id":36,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"statement_fingerprint","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"statement","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"collected_at","id":4,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"trace","id":5,"type":{"family":"JsonFamily","oid":3802},"nullable":true},{"name":"bundle_chunks","id":6,"type":{"family":"ArrayFamily","width":64,"arrayElemType":"IntFamily","oid":1016,"arrayContents":{"family":"IntFamily","width":64,"oid":20}},"nullable":true},{"name":"error","id":7,"type":{"family":"StringFamily","oid":25},"nullable":true}],"nextColumnId":8,"families":[{"name":"primary","columnNames":["id","statement_fingerprint","statement","collected_at","trace","bundle_chunks","error"],"columnIds":[1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["statement_fingerprint","statement","collected_at","trace","bundle_chunks","error"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"nextIndexId":2,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":2}} +{"table":{"name":"statement_diagnostics_requests","id":35,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"id","id":1,"type":{"family":"IntFamily","width":64,"oid":20},"defaultExpr":"unique_rowid()"},{"name":"completed","id":2,"type":{"oid":16},"defaultExpr":"false"},{"name":"statement_fingerprint","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"statement_diagnostics_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"requested_at","id":5,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"min_execution_latency","id":6,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}},"nullable":true},{"name":"expires_at","id":7,"type":{"family":"TimestampTZFamily","oid":1184},"nullable":true},{"name":"sampling_probability","id":8,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true}],"nextColumnId":9,"families":[{"name":"primary","columnNames":["id","completed","statement_fingerprint","statement_diagnostics_id","requested_at","min_execution_latency","expires_at","sampling_probability"],"columnIds":[1,2,3,4,5,6,7,8]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["completed","statement_fingerprint","statement_diagnostics_id","requested_at","min_execution_latency","expires_at","sampling_probability"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7,8],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"completed_idx","id":2,"version":3,"keyColumnNames":["completed","id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["statement_fingerprint","min_execution_latency","expires_at","sampling_probability"],"keyColumnIds":[2,1],"storeColumnIds":[3,6,7,8],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"480","withGrantOption":"480"},{"userProto":"root","privileges":"480","withGrantOption":"480"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"sampling_probability BETWEEN _:::FLOAT8 AND _:::FLOAT8","name":"check_sampling_probability","columnIds":[8],"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} +{"table":{"name":"transaction_statistics","id":43,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"aggregated_ts","id":1,"type":{"family":"TimestampTZFamily","oid":1184}},{"name":"fingerprint_id","id":2,"type":{"family":"BytesFamily","oid":17}},{"name":"app_name","id":3,"type":{"family":"StringFamily","oid":25}},{"name":"node_id","id":4,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"agg_interval","id":5,"type":{"family":"IntervalFamily","oid":1186,"intervalDurationField":{}}},{"name":"metadata","id":6,"type":{"family":"JsonFamily","oid":3802}},{"name":"statistics","id":7,"type":{"family":"JsonFamily","oid":3802}},{"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","id":8,"type":{"family":"IntFamily","width":32,"oid":23},"hidden":true,"computeExpr":"mod(fnv32(crdb_internal.datums_to_bytes(aggregated_ts, app_name, fingerprint_id, node_id)), _:::INT8)"}],"nextColumnId":9,"families":[{"name":"primary","columnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id","agg_interval","metadata","statistics"],"columnIds":[8,1,2,3,4,5,6,7]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","aggregated_ts","fingerprint_id","app_name","node_id"],"keyColumnDirections":["ASC","ASC","ASC","ASC","ASC"],"storeColumnNames":["agg_interval","metadata","statistics"],"keyColumnIds":[8,1,2,3,4],"storeColumnIds":[5,6,7],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{"isSharded":true,"name":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","shardBuckets":8,"columnNames":["aggregated_ts","app_name","fingerprint_id","node_id"]},"geoConfig":{},"constraintId":1},"indexes":[{"name":"fingerprint_stats_idx","id":2,"version":3,"keyColumnNames":["fingerprint_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[8,1,3,4],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":3,"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"nextMutationId":1,"formatVersion":3,"checks":[{"expr":"crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8 IN (_:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8, _:::INT8)","name":"check_crdb_internal_aggregated_ts_app_name_fingerprint_id_node_id_shard_8","columnIds":[8],"fromHashShardedColumn":true,"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} diff --git a/pkg/sql/logictest/testdata/logic_test/cluster_locks b/pkg/sql/logictest/testdata/logic_test/cluster_locks index 6072519e108a..f33ef96cc59c 100644 --- a/pkg/sql/logictest/testdata/logic_test/cluster_locks +++ b/pkg/sql/logictest/testdata/logic_test/cluster_locks @@ -21,7 +21,7 @@ query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t WITH DETAILS] ---- start_key end_key replicas lease_holder - …/1/"d" {1} 1 + …/1/"d" {1} 1 …/1/"d" …/1/"r" {1} 1 …/1/"r" {1} 1 diff --git a/pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog b/pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog index e35f52b6f6b3..26658d15393f 100644 --- a/pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog +++ b/pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog @@ -151,6 +151,8 @@ SELECT id, strip_volatile(descriptor) FROM crdb_internal.kv_catalog_descriptor 55 {"table": {"columns": [{"defaultExpr": "gen_random_uuid()", "id": 1, "name": "id", "type": {"family": "UuidFamily", "oid": 2950}}, {"id": 2, "name": "sample_id", "type": {"family": "UuidFamily", "oid": 2950}}, {"id": 3, "name": "start_key_id", "type": {"family": "UuidFamily", "oid": 2950}}, {"id": 4, "name": "end_key_id", "type": {"family": "UuidFamily", "oid": 2950}}, {"id": 5, "name": "requests", "type": {"family": "IntFamily", "oid": 20, "width": 64}}], "formatVersion": 3, "id": 55, "indexes": [{"foreignKey": {}, "geoConfig": {}, "id": 2, "interleave": {}, "keyColumnDirections": ["ASC"], "keyColumnIds": [2], "keyColumnNames": ["sample_id"], "keySuffixColumnIds": [1], "name": "buckets_sample_id_idx", "partitioning": {}, "sharded": {}, "version": 3}], "name": "span_stats_buckets", "nextColumnId": 6, "nextConstraintId": 2, "nextIndexId": 3, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC"], "keyColumnIds": [1], "keyColumnNames": ["id"], "name": "primary", "partitioning": {}, "sharded": {}, "storeColumnIds": [2, 3, 4, 5], "storeColumnNames": ["sample_id", "start_key_id", "end_key_id", "requests"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "480", "userProto": "admin", "withGrantOption": "480"}, {"privileges": "480", "userProto": "root", "withGrantOption": "480"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} 56 {"table": {"columns": [{"defaultExpr": "gen_random_uuid()", "id": 1, "name": "id", "type": {"family": "UuidFamily", "oid": 2950}}, {"defaultExpr": "now():::TIMESTAMP", "id": 2, "name": "sample_time", "type": {"family": "TimestampFamily", "oid": 1114}}], "formatVersion": 3, "id": 56, "indexes": [{"constraintId": 1, "foreignKey": {}, "geoConfig": {}, "id": 2, "interleave": {}, "keyColumnDirections": ["ASC"], "keyColumnIds": [2], "keyColumnNames": ["sample_time"], "keySuffixColumnIds": [1], "name": "samples_sample_time_idx", "partitioning": {}, "sharded": {}, "unique": true, "version": 3}], "name": "span_stats_samples", "nextColumnId": 3, "nextConstraintId": 3, "nextIndexId": 3, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 2, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC"], "keyColumnIds": [1], "keyColumnNames": ["id"], "name": "primary", "partitioning": {}, "sharded": {}, "storeColumnIds": [2], "storeColumnNames": ["sample_time"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "480", "userProto": "admin", "withGrantOption": "480"}, {"privileges": "480", "userProto": "root", "withGrantOption": "480"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} 57 {"table": {"columns": [{"id": 1, "name": "tenant_id", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 2, "name": "boundaries", "type": {"family": "BytesFamily", "oid": 17}}], "formatVersion": 3, "id": 57, "name": "span_stats_tenant_boundaries", "nextColumnId": 3, "nextConstraintId": 2, "nextIndexId": 2, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC"], "keyColumnIds": [1], "keyColumnNames": ["tenant_id"], "name": "primary", "partitioning": {}, "sharded": {}, "storeColumnIds": [2], "storeColumnNames": ["boundaries"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "480", "userProto": "admin", "withGrantOption": "480"}, {"privileges": "480", "userProto": "root", "withGrantOption": "480"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} +58 {"table": {"columns": [{"id": 1, "name": "id", "type": {"family": "StringFamily", "oid": 25}}, {"defaultExpr": "now():::TIMESTAMPTZ", "id": 2, "name": "created", "type": {"family": "TimestampTZFamily", "oid": 1184}}, {"id": 3, "name": "owner", "type": {"family": "StringFamily", "oid": 25}}, {"id": 4, "name": "owner_id", "nullable": true, "type": {"family": "OidFamily", "oid": 26}}, {"id": 5, "name": "min_version", "type": {"family": "StringFamily", "oid": 25}}, {"id": 6, "name": "description", "nullable": true, "type": {"family": "StringFamily", "oid": 25}}, {"id": 7, "name": "type", "type": {"family": "StringFamily", "oid": 25}}, {"id": 8, "name": "value", "type": {"family": "BytesFamily", "oid": 17}}], "formatVersion": 3, "id": 58, "name": "task_payloads", "nextColumnId": 9, "nextConstraintId": 2, "nextIndexId": 2, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC"], "keyColumnIds": [1], "keyColumnNames": ["id"], "name": "primary", "partitioning": {}, "sharded": {}, "storeColumnIds": [2, 3, 4, 5, 6, 7, 8], "storeColumnNames": ["created", "owner", "owner_id", "min_version", "description", "type", "value"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "480", "userProto": "admin", "withGrantOption": "480"}, {"privileges": "480", "userProto": "root", "withGrantOption": "480"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} +59 {"table": {"columns": [{"id": 1, "name": "tenant_id", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 2, "name": "issuer", "type": {"family": "StringFamily", "oid": 25}}, {"id": 3, "name": "task_id", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"defaultExpr": "now():::TIMESTAMPTZ", "id": 4, "name": "created", "type": {"family": "TimestampTZFamily", "oid": 1184}}, {"id": 5, "name": "payload_id", "type": {"family": "StringFamily", "oid": 25}}, {"id": 6, "name": "owner", "type": {"family": "StringFamily", "oid": 25}}, {"id": 7, "name": "owner_id", "nullable": true, "type": {"family": "OidFamily", "oid": 26}}], "formatVersion": 3, "id": 59, "name": "tenant_tasks", "nextColumnId": 8, "nextConstraintId": 2, "nextIndexId": 2, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "ASC"], "keyColumnIds": [1, 2, 3], "keyColumnNames": ["tenant_id", "issuer", "task_id"], "name": "primary", "partitioning": {}, "sharded": {}, "storeColumnIds": [4, 5, 6, 7], "storeColumnNames": ["created", "payload_id", "owner", "owner_id"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "480", "userProto": "admin", "withGrantOption": "480"}, {"privileges": "480", "userProto": "root", "withGrantOption": "480"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} 100 {"database": {"defaultPrivileges": {}, "id": 100, "name": "defaultdb", "privileges": {"ownerProto": "root", "users": [{"privileges": "2", "userProto": "admin", "withGrantOption": "2"}, {"privileges": "2048", "userProto": "public"}, {"privileges": "2", "userProto": "root", "withGrantOption": "2"}], "version": 2}, "schemas": {"public": {"id": 101}}, "version": "1"}} 101 {"schema": {"id": 101, "name": "public", "parentId": 100, "privileges": {"ownerProto": "admin", "users": [{"privileges": "2", "userProto": "admin", "withGrantOption": "2"}, {"privileges": "516", "userProto": "public"}, {"privileges": "2", "userProto": "root", "withGrantOption": "2"}], "version": 2}, "version": "1"}} 102 {"database": {"defaultPrivileges": {}, "id": 102, "name": "postgres", "privileges": {"ownerProto": "root", "users": [{"privileges": "2", "userProto": "admin", "withGrantOption": "2"}, {"privileges": "2048", "userProto": "public"}, {"privileges": "2", "userProto": "root", "withGrantOption": "2"}], "version": 2}, "schemas": {"public": {"id": 103}}, "version": "1"}} @@ -520,7 +522,9 @@ SELECT * FROM "".crdb_internal.kv_catalog_namespace 1 29 statement_diagnostics_requests 35 1 29 statement_statistics 42 1 29 table_statistics 20 +1 29 task_payloads 58 1 29 tenant_settings 50 +1 29 tenant_tasks 59 1 29 tenant_usage 45 1 29 tenants 8 1 29 transaction_statistics 43 diff --git a/pkg/sql/logictest/testdata/logic_test/dist_vectorize b/pkg/sql/logictest/testdata/logic_test/dist_vectorize index 0565f836bd29..e2c40616e06b 100644 --- a/pkg/sql/logictest/testdata/logic_test/dist_vectorize +++ b/pkg/sql/logictest/testdata/logic_test/dist_vectorize @@ -28,13 +28,14 @@ ALTER TABLE kw EXPERIMENTAL_RELOCATE SELECT ARRAY[i], i FROM generate_series(1, # Verify data placement. query TTTI rowsort SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE kv WITH DETAILS] +ORDER by 1 ---- + …/1/1 {1} 1 +…/1/1 …/1/2 {1} 1 …/1/2 …/1/3 {2} 2 …/1/3 …/1/4 {3} 3 -…/1/5 {5} 5 -…/1/1 …/1/2 {1} 1 - …/1/1 {1} 1 …/1/4 …/1/5 {4} 4 +…/1/5 {5} 5 # Verify data placement. query TTTI rowsort diff --git a/pkg/sql/logictest/testdata/logic_test/distsql_agg b/pkg/sql/logictest/testdata/logic_test/distsql_agg index 25ff8aa7284f..e73df8f78a7d 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_agg +++ b/pkg/sql/logictest/testdata/logic_test/distsql_agg @@ -23,17 +23,18 @@ INSERT INTO data SELECT a, b, c::FLOAT, d::DECIMAL FROM # Verify data placement. query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE data WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder -…/1/5 …/1/6 {1} 1 -…/1/6 …/1/7 {2} 2 -…/1/2 …/1/3 {3} 3 -…/1/8 …/1/9 {4} 4 - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/2 {2} 2 +…/1/2 …/1/3 {3} 3 …/1/3 …/1/4 {4} 4 …/1/4 …/1/5 {5} 5 +…/1/5 …/1/6 {1} 1 +…/1/6 …/1/7 {2} 2 …/1/7 …/1/8 {3} 3 +…/1/8 …/1/9 {4} 4 …/1/9 {5} 5 query RI diff --git a/pkg/sql/logictest/testdata/logic_test/distsql_crdb_internal b/pkg/sql/logictest/testdata/logic_test/distsql_crdb_internal index 698b3102e025..8e2ed455366d 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_crdb_internal +++ b/pkg/sql/logictest/testdata/logic_test/distsql_crdb_internal @@ -23,18 +23,19 @@ INSERT INTO data SELECT a, b, c::FLOAT, d::DECIMAL FROM # Verify data placement. query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE data WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/2 {2} 2 +…/1/2 …/1/3 {3} 3 …/1/3 …/1/4 {4} 4 …/1/4 …/1/5 {5} 5 -…/1/7 …/1/8 {3} 3 -…/1/9 {5} 5 …/1/5 …/1/6 {1} 1 …/1/6 …/1/7 {2} 2 -…/1/2 …/1/3 {3} 3 +…/1/7 …/1/8 {3} 3 …/1/8 …/1/9 {4} 4 +…/1/9 {5} 5 # As of #69273, crdb_internal.reset_sql_stats()'s behavior changes from in-memory diff --git a/pkg/sql/logictest/testdata/logic_test/distsql_distinct_on b/pkg/sql/logictest/testdata/logic_test/distsql_distinct_on index ef3de3d3d851..35fc7345d90f 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_distinct_on +++ b/pkg/sql/logictest/testdata/logic_test/distsql_distinct_on @@ -63,13 +63,14 @@ ALTER TABLE abc EXPERIMENTAL_RELOCATE VALUES query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE xyz WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder + …/1/2 {1} 1 …/1/2 …/1/4 {2} 2 …/1/4 …/1/6 {3} 3 …/1/6 …/1/7 {4} 4 …/1/7 {5} 5 - …/1/2 {1} 1 query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE abc WITH DETAILS] diff --git a/pkg/sql/logictest/testdata/logic_test/distsql_enum b/pkg/sql/logictest/testdata/logic_test/distsql_enum index 69420473f5fb..90ba269ec66b 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_enum +++ b/pkg/sql/logictest/testdata/logic_test/distsql_enum @@ -48,7 +48,7 @@ query TTTI colnames SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE t1 WITH DETAILS] ORDER BY lease_holder, start_key ---- start_key end_key replicas lease_holder - …/1/0 {1} 1 + …/1/0 {1} 1 …/1/0 …/1/10 {1} 1 …/1/10 …/1/20 {2} 2 …/1/20 {3} 3 diff --git a/pkg/sql/logictest/testdata/logic_test/distsql_numtables b/pkg/sql/logictest/testdata/logic_test/distsql_numtables index 7b161768cf3b..34153d1cae54 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_numtables +++ b/pkg/sql/logictest/testdata/logic_test/distsql_numtables @@ -30,17 +30,18 @@ query TTTI colnames SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE NumToSquare WITH DETAILS] ---- start_key end_key replicas lease_holder - {1} 1 + {1} 1 query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE NumToStr WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder -…/1/4000 …/1/6000 {3} 3 + …/1/2000 {1} 1 …/1/2000 …/1/4000 {2} 2 -…/1/8000 {5} 5 - …/1/2000 {1} 1 +…/1/4000 …/1/6000 {3} 3 …/1/6000 …/1/8000 {4} 4 +…/1/8000 {5} 5 # # -- Basic tests -- diff --git a/pkg/sql/logictest/testdata/logic_test/distsql_stats b/pkg/sql/logictest/testdata/logic_test/distsql_stats index 271c985cd97c..0a26ccad8e4a 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_stats +++ b/pkg/sql/logictest/testdata/logic_test/distsql_stats @@ -32,7 +32,7 @@ query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE data WITH DETAILS] ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/2 {2} 2 …/1/2 …/1/3 {3} 3 …/1/3 …/1/4 {4} 4 diff --git a/pkg/sql/logictest/testdata/logic_test/distsql_subquery b/pkg/sql/logictest/testdata/logic_test/distsql_subquery index 3aad1d2f7ef4..ea1a3e468cf4 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_subquery +++ b/pkg/sql/logictest/testdata/logic_test/distsql_subquery @@ -20,10 +20,11 @@ ALTER TABLE ab EXPERIMENTAL_RELOCATE VALUES (ARRAY[1], 1), (ARRAY[2], 2) query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE ab WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder + …/1/2 {1} 1 …/1/2 {2} 2 - …/1/2 {1} 1 query T SELECT ARRAY(SELECT a FROM ab ORDER BY b) diff --git a/pkg/sql/logictest/testdata/logic_test/distsql_union b/pkg/sql/logictest/testdata/logic_test/distsql_union index 6b3ce008d62d..a6406005d937 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_union +++ b/pkg/sql/logictest/testdata/logic_test/distsql_union @@ -29,11 +29,12 @@ ALTER TABLE xyz EXPERIMENTAL_RELOCATE VALUES query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE xyz WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder + …/1/2 {1} 1 …/1/2 …/1/3 {2} 2 …/1/3 …/1/4 {3} 3 - …/1/2 {1} 1 …/1/4 …/1/5 {4} 4 …/1/5 {5} 5 diff --git a/pkg/sql/logictest/testdata/logic_test/experimental_distsql_planning_5node b/pkg/sql/logictest/testdata/logic_test/experimental_distsql_planning_5node index 178742288e3d..bc8e2dfcce19 100644 --- a/pkg/sql/logictest/testdata/logic_test/experimental_distsql_planning_5node +++ b/pkg/sql/logictest/testdata/logic_test/experimental_distsql_planning_5node @@ -20,9 +20,10 @@ ALTER TABLE kw EXPERIMENTAL_RELOCATE SELECT ARRAY[i], i FROM generate_series(1, # Verify data placement. query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE kv WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/2 {1} 1 …/1/2 …/1/3 {2} 2 …/1/3 …/1/4 {3} 3 diff --git a/pkg/sql/logictest/testdata/logic_test/gen_test_objects b/pkg/sql/logictest/testdata/logic_test/gen_test_objects index 4880a6df95a8..0ab77b53312f 100644 --- a/pkg/sql/logictest/testdata/logic_test/gen_test_objects +++ b/pkg/sql/logictest/testdata/logic_test/gen_test_objects @@ -173,17 +173,16 @@ query T SELECT table_name FROM [SHOW TABLES] ORDER BY table_name ---- -database_role_settings -ev̅entlog -namespace -prote"cted_ts"_records -replication_critical_localitieS -se -ttings +comments. +databa&se_role_settings +pr"otected__ts_records +protected_ts%v_meta +rangelog +replication_sTats +scheduled_jobs +settings sql_instances -statement_statist😍ics -ui -zon es +tena'nts # Again, the column names are randomized. query TTT @@ -192,26 +191,26 @@ WHERE table_catalog = 'newdb2' AND table_schema = 'public' ORDER BY table_name, column_name LIMIT 20 ---- -database_role_settings database_id oid -database_role_settings "role\\u6CFA_id" oid -database_role_settings "role_nam*e" text -database_role_settings rowid bigint -database_role_settings "set tings" ARRAY -ev̅entlog """uniqueID" bytea -ev̅entlog "eventType" text -ev̅entlog info text -ev̅entlog "reporti%55ngID" bigint -ev̅entlog rowid bigint -ev̅entlog "targetID" bigint -ev̅entlog "timestamp" timestamp without time zone -namespace "name " text -namespace "parent%42ID" bigint -namespace "parentSchemaID" bigint -namespace rowid bigint -namespace 😁id bigint -"prote""cted_ts""_records" "Id" uuid -"prote""cted_ts""_records" meta bytea -"prote""cted_ts""_records" meta_type text +"comments." comment text +"comments." object_id bigint +"comments." rowid bigint +"comments." sub_id bigint +"comments." type bigint +"databa&se_role_settings" datab̹ase_id oid +"databa&se_role_settings" "ro le_name" text +"databa&se_role_settings" role_id oid +"databa&se_role_settings" rowid bigint +"databa&se_role_settings" "se ttings" ARRAY +"pr""otected__ts_records" "Id\f" uuid +"pr""otected__ts_records" "me\rta" bytea +"pr""otected__ts_records" "meta_t""ype" text +"pr""otected__ts_records" num_spans bigint +"pr""otected__ts_records" rowid bigint +"pr""otected__ts_records" "ta.rget" bytea +"pr""otected__ts_records" "ts&" numeric +"pr""otected__ts_records" "veri%7dfi͟ed" boolean +"pr""otected__ts_records" 😲spans bytea +"protected_ts%v_meta" " num_span/s" bigint subtest templates/different_templates_in_each_db @@ -229,15 +228,15 @@ SELECT quote_ident(database_name), quote_ident(schema_name), quote_ident(name) FROM "".crdb_internal.tables WHERE database_name ILIKE '%d%b%t%' ORDER BY database_name, schema_name, name ---- -"d%qbt1" public jobs -"d%qbt1" public join_tokens -"d%qbt1" public "te naNt_settings" -"d%qbt2" public "join_t\\uC6F5okens" -"d%qbt2" public "privIleges" -"d%qbt2" public tenants -dbt3 public na😔mespace -dbt3 public "rEports_meta" -dbt3 public role_members +"d%qbt1" public "sc%phe duled\n_jobs" +"d%qbt1" public table_statistics +"d%qbt1" public web_sessions +"d%qbt2" public lease +"d%qbt2" public "r*o)le_i d_seq" +"d%qbt2" public "statement_bund le_chunks" +dbt3 public "joi-n_tokens %q" +dbt3 public "r%qepor\\U0008E540ts_meTa" +dbt3 public "span_stats_unique_keys " statement ok diff --git a/pkg/sql/logictest/testdata/logic_test/grant_table b/pkg/sql/logictest/testdata/logic_test/grant_table index 26494d62af1c..ed42ca60a1da 100644 --- a/pkg/sql/logictest/testdata/logic_test/grant_table +++ b/pkg/sql/logictest/testdata/logic_test/grant_table @@ -1016,6 +1016,22 @@ system public span_stats_tenant_boundaries root DELETE system public span_stats_tenant_boundaries root INSERT true system public span_stats_tenant_boundaries root SELECT true system public span_stats_tenant_boundaries root UPDATE true +system public task_payloads admin DELETE true +system public task_payloads admin INSERT true +system public task_payloads admin SELECT true +system public task_payloads admin UPDATE true +system public task_payloads root DELETE true +system public task_payloads root INSERT true +system public task_payloads root SELECT true +system public task_payloads root UPDATE true +system public tenant_tasks admin DELETE true +system public tenant_tasks admin INSERT true +system public tenant_tasks admin SELECT true +system public tenant_tasks admin UPDATE true +system public tenant_tasks root DELETE true +system public tenant_tasks root INSERT true +system public tenant_tasks root SELECT true +system public tenant_tasks root UPDATE true a pg_extension NULL public USAGE false a public NULL admin ALL true a public NULL public CREATE false @@ -1515,10 +1531,18 @@ system public table_statistics root DELETE system public table_statistics root INSERT true system public table_statistics root SELECT true system public table_statistics root UPDATE true +system public task_payloads root DELETE true +system public task_payloads root INSERT true +system public task_payloads root SELECT true +system public task_payloads root UPDATE true system public tenant_settings root DELETE true system public tenant_settings root INSERT true system public tenant_settings root SELECT true system public tenant_settings root UPDATE true +system public tenant_tasks root DELETE true +system public tenant_tasks root INSERT true +system public tenant_tasks root SELECT true +system public tenant_tasks root UPDATE true system public tenant_usage root DELETE true system public tenant_usage root INSERT true system public tenant_usage root SELECT true diff --git a/pkg/sql/logictest/testdata/logic_test/information_schema b/pkg/sql/logictest/testdata/logic_test/information_schema index aef848355bd9..7873450983f7 100644 --- a/pkg/sql/logictest/testdata/logic_test/information_schema +++ b/pkg/sql/logictest/testdata/logic_test/information_schema @@ -1458,6 +1458,8 @@ system public span_stats_unique_keys BASE T system public span_stats_buckets BASE TABLE YES 1 system public span_stats_samples BASE TABLE YES 1 system public span_stats_tenant_boundaries BASE TABLE YES 1 +system public task_payloads BASE TABLE YES 1 +system public tenant_tasks BASE TABLE YES 1 statement ok ALTER TABLE other_db.xyz ADD COLUMN j INT @@ -1717,12 +1719,26 @@ system public 29_20_6_not_null system public 29_20_7_not_null system public table_statistics CHECK NO NO system public 29_20_8_not_null system public table_statistics CHECK NO NO system public primary system public table_statistics PRIMARY KEY NO NO +system public 29_58_1_not_null system public task_payloads CHECK NO NO +system public 29_58_2_not_null system public task_payloads CHECK NO NO +system public 29_58_3_not_null system public task_payloads CHECK NO NO +system public 29_58_5_not_null system public task_payloads CHECK NO NO +system public 29_58_7_not_null system public task_payloads CHECK NO NO +system public 29_58_8_not_null system public task_payloads CHECK NO NO +system public primary system public task_payloads PRIMARY KEY NO NO system public 29_50_1_not_null system public tenant_settings CHECK NO NO system public 29_50_2_not_null system public tenant_settings CHECK NO NO system public 29_50_3_not_null system public tenant_settings CHECK NO NO system public 29_50_4_not_null system public tenant_settings CHECK NO NO system public 29_50_5_not_null system public tenant_settings CHECK NO NO system public primary system public tenant_settings PRIMARY KEY NO NO +system public 29_59_1_not_null system public tenant_tasks CHECK NO NO +system public 29_59_2_not_null system public tenant_tasks CHECK NO NO +system public 29_59_3_not_null system public tenant_tasks CHECK NO NO +system public 29_59_4_not_null system public tenant_tasks CHECK NO NO +system public 29_59_5_not_null system public tenant_tasks CHECK NO NO +system public 29_59_6_not_null system public tenant_tasks CHECK NO NO +system public primary system public tenant_tasks PRIMARY KEY NO NO system public 29_45_1_not_null system public tenant_usage CHECK NO NO system public 29_45_2_not_null system public tenant_usage CHECK NO NO system public 29_45_3_not_null system public tenant_usage CHECK NO NO @@ -1952,6 +1968,18 @@ system public 29_56_1_not_null system public 29_56_2_not_null sample_time IS NOT NULL system public 29_57_1_not_null tenant_id IS NOT NULL system public 29_57_2_not_null boundaries IS NOT NULL +system public 29_58_1_not_null id IS NOT NULL +system public 29_58_2_not_null created IS NOT NULL +system public 29_58_3_not_null owner IS NOT NULL +system public 29_58_5_not_null min_version IS NOT NULL +system public 29_58_7_not_null type IS NOT NULL +system public 29_58_8_not_null value IS NOT NULL +system public 29_59_1_not_null tenant_id IS NOT NULL +system public 29_59_2_not_null issuer IS NOT NULL +system public 29_59_3_not_null task_id IS NOT NULL +system public 29_59_4_not_null created IS NOT NULL +system public 29_59_5_not_null payload_id IS NOT NULL +system public 29_59_6_not_null owner IS NOT NULL system public 29_5_1_not_null id IS NOT NULL system public 29_6_1_not_null name IS NOT NULL system public 29_6_2_not_null value IS NOT NULL @@ -2058,8 +2086,12 @@ system public statement_statistics plan_hash system public statement_statistics transaction_fingerprint_id system public primary system public table_statistics statisticID system public primary system public table_statistics tableID system public primary +system public task_payloads id system public primary system public tenant_settings name system public primary system public tenant_settings tenant_id system public primary +system public tenant_tasks issuer system public primary +system public tenant_tasks task_id system public primary +system public tenant_tasks tenant_id system public primary system public tenant_usage instance_id system public primary system public tenant_usage tenant_id system public primary system public tenants id system public primary @@ -2388,12 +2420,27 @@ system public table_statistics partialPredicate system public table_statistics rowCount 6 system public table_statistics statisticID 2 system public table_statistics tableID 1 +system public task_payloads created 2 +system public task_payloads description 6 +system public task_payloads id 1 +system public task_payloads min_version 5 +system public task_payloads owner 3 +system public task_payloads owner_id 4 +system public task_payloads type 7 +system public task_payloads value 8 system public tenant_settings last_updated 4 system public tenant_settings name 2 system public tenant_settings reason 6 system public tenant_settings tenant_id 1 system public tenant_settings value 3 system public tenant_settings value_type 5 +system public tenant_tasks created 4 +system public tenant_tasks issuer 2 +system public tenant_tasks owner 6 +system public tenant_tasks owner_id 7 +system public tenant_tasks payload_id 5 +system public tenant_tasks task_id 3 +system public tenant_tasks tenant_id 1 system public tenant_usage current_share_sum 8 system public tenant_usage instance_id 2 system public tenant_usage instance_lease 10 @@ -3476,6 +3523,14 @@ NULL root system public table_statistics NULL root system public table_statistics INSERT YES NO NULL root system public table_statistics SELECT YES YES NULL root system public table_statistics UPDATE YES NO +NULL admin system public task_payloads DELETE YES NO +NULL admin system public task_payloads INSERT YES NO +NULL admin system public task_payloads SELECT YES YES +NULL admin system public task_payloads UPDATE YES NO +NULL root system public task_payloads DELETE YES NO +NULL root system public task_payloads INSERT YES NO +NULL root system public task_payloads SELECT YES YES +NULL root system public task_payloads UPDATE YES NO NULL admin system public tenant_settings DELETE YES NO NULL admin system public tenant_settings INSERT YES NO NULL admin system public tenant_settings SELECT YES YES @@ -3484,6 +3539,14 @@ NULL root system public tenant_settings NULL root system public tenant_settings INSERT YES NO NULL root system public tenant_settings SELECT YES YES NULL root system public tenant_settings UPDATE YES NO +NULL admin system public tenant_tasks DELETE YES NO +NULL admin system public tenant_tasks INSERT YES NO +NULL admin system public tenant_tasks SELECT YES YES +NULL admin system public tenant_tasks UPDATE YES NO +NULL root system public tenant_tasks DELETE YES NO +NULL root system public tenant_tasks INSERT YES NO +NULL root system public tenant_tasks SELECT YES YES +NULL root system public tenant_tasks UPDATE YES NO NULL admin system public tenant_usage DELETE YES NO NULL admin system public tenant_usage INSERT YES NO NULL admin system public tenant_usage SELECT YES YES @@ -4155,6 +4218,22 @@ NULL root system public span_stats_tenant_boundarie NULL root system public span_stats_tenant_boundaries INSERT YES NO NULL root system public span_stats_tenant_boundaries SELECT YES YES NULL root system public span_stats_tenant_boundaries UPDATE YES NO +NULL admin system public task_payloads DELETE YES NO +NULL admin system public task_payloads INSERT YES NO +NULL admin system public task_payloads SELECT YES YES +NULL admin system public task_payloads UPDATE YES NO +NULL root system public task_payloads DELETE YES NO +NULL root system public task_payloads INSERT YES NO +NULL root system public task_payloads SELECT YES YES +NULL root system public task_payloads UPDATE YES NO +NULL admin system public tenant_tasks DELETE YES NO +NULL admin system public tenant_tasks INSERT YES NO +NULL admin system public tenant_tasks SELECT YES YES +NULL admin system public tenant_tasks UPDATE YES NO +NULL root system public tenant_tasks DELETE YES NO +NULL root system public tenant_tasks INSERT YES NO +NULL root system public tenant_tasks SELECT YES YES +NULL root system public tenant_tasks UPDATE YES NO statement ok USE other_db; diff --git a/pkg/sql/logictest/testdata/logic_test/inverted_filter_geospatial_dist b/pkg/sql/logictest/testdata/logic_test/inverted_filter_geospatial_dist index 6f27ab8ab5be..24f2519adddc 100644 --- a/pkg/sql/logictest/testdata/logic_test/inverted_filter_geospatial_dist +++ b/pkg/sql/logictest/testdata/logic_test/inverted_filter_geospatial_dist @@ -60,9 +60,10 @@ ALTER INDEX geo_table@geom_index EXPERIMENTAL_RELOCATE VALUES (ARRAY[2], 1152921 query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM INDEX geo_table@geom_index WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1152921574000000000 {1} 1 + …/1152921574000000000 {1} 1 …/1152921574000000000 {2} 2 # Distributed. @@ -88,9 +89,10 @@ ALTER INDEX geo_table@geom_index EXPERIMENTAL_RELOCATE VALUES (ARRAY[2], 1) query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM INDEX geo_table@geom_index WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1152921574000000000 {2} 2 + …/1152921574000000000 {2} 2 …/1152921574000000000 {2} 2 query I diff --git a/pkg/sql/logictest/testdata/logic_test/inverted_join_geospatial_dist b/pkg/sql/logictest/testdata/logic_test/inverted_join_geospatial_dist index e11f18b7adf5..722aea968040 100644 --- a/pkg/sql/logictest/testdata/logic_test/inverted_join_geospatial_dist +++ b/pkg/sql/logictest/testdata/logic_test/inverted_join_geospatial_dist @@ -39,7 +39,7 @@ query TTTI colnames SELECT start_key, end_key, replicas, lease_holder from [SHOW EXPERIMENTAL_RANGES FROM TABLE ltable WITH DETAILS] ORDER BY lease_holder ---- start_key end_key replicas lease_holder - …/1/2 {1} 1 + …/1/2 {1} 1 …/1/2 …/1/3 {2} 2 …/1/3 {3} 3 diff --git a/pkg/sql/logictest/testdata/logic_test/jobs b/pkg/sql/logictest/testdata/logic_test/jobs index c9e815fc4261..a16942657b46 100644 --- a/pkg/sql/logictest/testdata/logic_test/jobs +++ b/pkg/sql/logictest/testdata/logic_test/jobs @@ -263,3 +263,9 @@ query I SELECT count(*) FROM [SHOW AUTOMATIC JOBS] WHERE job_type = 'POLL JOBS STATS' AND status = 'running' ---- 1 + +# Ensure one AUTO CONFIG RUNNER job is running +query I +SELECT count(*) FROM [SHOW AUTOMATIC JOBS] WHERE job_type = 'AUTO CONFIG RUNNER' AND status = 'running' +---- +1 diff --git a/pkg/sql/logictest/testdata/logic_test/merge_join_dist b/pkg/sql/logictest/testdata/logic_test/merge_join_dist index 76d59e99cfb6..66d19863e159 100644 --- a/pkg/sql/logictest/testdata/logic_test/merge_join_dist +++ b/pkg/sql/logictest/testdata/logic_test/merge_join_dist @@ -30,7 +30,7 @@ query TTTI colnames SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE l WITH DETAILS] ORDER BY lease_holder ---- start_key end_key replicas lease_holder - …/1/2 {1} 1 + …/1/2 {1} 1 …/1/2 …/1/3 {2} 2 …/1/3 {3} 3 diff --git a/pkg/sql/logictest/testdata/logic_test/pg_catalog b/pkg/sql/logictest/testdata/logic_test/pg_catalog index 84325d23e430..b0aee77af4ec 100644 --- a/pkg/sql/logictest/testdata/logic_test/pg_catalog +++ b/pkg/sql/logictest/testdata/logic_test/pg_catalog @@ -1126,6 +1126,7 @@ indexrelid indrelid indnatts indisunique indnullsnotdistinct indisprimary 663840564 42 1 false false false false false false true false false true false 13 0 0 2 NULL NULL 1 663840565 42 2 false false false false false false true false false true false 2 3 0 0 0 0 2 2 NULL NULL 2 663840566 42 6 true false true false true false true false false true false 1 2 3 4 5 6 0 0 0 0 3403232968 0 0 0 0 0 0 0 2 2 2 2 2 2 NULL NULL 6 +710236230 58 1 true false true false true false true false false true false 1 3403232968 0 2 NULL NULL 1 803027558 26 3 true false true false true false true false false true false 1 2 3 0 0 3403232968 0 0 0 2 2 2 NULL NULL 3 923576837 41 1 true false true false true false true false false true false 1 0 0 2 NULL NULL 1 969972501 57 1 true false true false true false true false false true false 1 0 0 2 NULL NULL 1 @@ -1178,6 +1179,7 @@ indexrelid indrelid indnatts indisunique indnullsnotdistinct indisprimary 3493181576 20 2 true false true false true false true false false true false 1 2 0 0 0 0 2 2 NULL NULL 2 3613730852 43 1 false false false false false false true false false true false 2 0 0 2 NULL NULL 1 3613730855 43 4 true false true false true false true false false true false 1 2 3 4 0 0 3403232968 0 0 0 0 0 2 2 2 2 NULL NULL 4 +3660126519 59 3 true false true false true false true false false true false 1 2 3 0 3403232968 0 0 0 0 2 2 2 NULL NULL 3 3706522180 11 5 true false true false true false true false false true false 5 1 2 4 3 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 NULL NULL 5 3752917847 27 2 true false true false true false true false false true false 1 2 0 0 0 0 2 2 NULL NULL 2 3873467121 46 2 true false true false true false true false false true false 6 1 0 0 0 0 2 2 NULL NULL 2 @@ -1220,6 +1222,7 @@ indexrelid operator_argument_type_oid operator_argument_position 663840566 0 4 663840566 0 5 663840566 0 6 +710236230 0 1 803027558 0 1 803027558 0 2 803027558 0 3 @@ -1302,6 +1305,9 @@ indexrelid operator_argument_type_oid operator_argument_position 3613730855 0 2 3613730855 0 3 3613730855 0 4 +3660126519 0 1 +3660126519 0 2 +3660126519 0 3 3706522180 0 1 3706522180 0 2 3706522180 0 3 diff --git a/pkg/sql/logictest/testdata/logic_test/ranges b/pkg/sql/logictest/testdata/logic_test/ranges index e1bf551c4734..daf56eef902a 100644 --- a/pkg/sql/logictest/testdata/logic_test/ranges +++ b/pkg/sql/logictest/testdata/logic_test/ranges @@ -11,18 +11,20 @@ ALTER TABLE t EXPERIMENTAL_RELOCATE VALUES (ARRAY[NULL], NULL); query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - {1} 1 + {1} 1 statement ok ALTER TABLE t SPLIT AT VALUES (1), (10) query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/10 {1} 1 …/1/10 {1} 1 @@ -34,9 +36,10 @@ ALTER TABLE t EXPERIMENTAL_RELOCATE LEASE VALUES (4, 1, 12) query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/10 {4} 4 …/1/10 {1} 1 @@ -45,9 +48,10 @@ ALTER TABLE t SPLIT AT VALUES (5,1), (5,2), (5,3) query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/5/1 {4} 4 …/1/5/1 …/1/5/2 {4} 4 …/1/5/2 …/1/5/3 {4} 4 @@ -65,9 +69,10 @@ ALTER TABLE t EXPERIMENTAL_RELOCATE LEASE VALUES (1, 5, 1), (5, 5, 2) query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/5/1 {3,4} 3 …/1/5/1 …/1/5/2 {1,2,3} 1 …/1/5/2 …/1/5/3 {2,3,5} 5 @@ -215,7 +220,9 @@ bd /Table/53 be /Table/ be /Table/54 bf /Table/55 {1} 1 bf /Table/55 c0 /Table/56 {1} 1 c0 /Table/56 c1 /Table/57 {1} 1 -c1 /Table/57 f28989 /Table/106/1/1 {1} 1 +c1 /Table/57 c2 /Table/58 {1} 1 +c2 /Table/58 c3 /Table/59 {1} 1 +c3 /Table/59 f28989 /Table/106/1/1 {1} 1 f28989 /Table/106/1/1 f2898d89 /Table/106/1/5/1 {3,4} 3 f2898d89 /Table/106/1/5/1 f2898d8a /Table/106/1/5/2 {1,2,3} 1 f2898d8a /Table/106/1/5/2 f2898d8b /Table/106/1/5/3 {2,3,5} 5 @@ -292,7 +299,9 @@ bd /Table/53 be /Table/ be /Table/54 bf /Table/55 {1} 1 bf /Table/55 c0 /Table/56 {1} 1 c0 /Table/56 c1 /Table/57 {1} 1 -c1 /Table/57 f28989 /Table/106/1/1 {1} 1 +c1 /Table/57 c2 /Table/58 {1} 1 +c2 /Table/58 c3 /Table/59 {1} 1 +c3 /Table/59 f28989 /Table/106/1/1 {1} 1 f28989 /Table/106/1/1 f2898d89 /Table/106/1/5/1 {3,4} 3 f2898d89 /Table/106/1/5/1 f2898d8a /Table/106/1/5/2 {1,2,3} 1 f2898d8a /Table/106/1/5/2 f2898d8b /Table/106/1/5/3 {2,3,5} 5 diff --git a/pkg/sql/logictest/testdata/logic_test/show_ranges b/pkg/sql/logictest/testdata/logic_test/show_ranges index 7bf700c3cccf..ea9279cafc5b 100644 --- a/pkg/sql/logictest/testdata/logic_test/show_ranges +++ b/pkg/sql/logictest/testdata/logic_test/show_ranges @@ -197,11 +197,11 @@ SELECT start_key, end_key, range_id, split_enforced_until FROM [SHOW RANGES] ORDER BY range_id ---- start_key end_key range_id split_enforced_until -/Table/57 /Table/106/1/10 58 NULL -/Table/106/1/10 /Table/106/2/20 59 2262-04-11 23:47:16.854776 +0000 +0000 -/Table/106/2/20 /Table/106/2/30 60 2262-04-11 23:47:16.854776 +0000 +0000 -/Table/106/2/30 /Table/107/1/42 61 2262-04-11 23:47:16.854776 +0000 +0000 -/Table/107/1/42 /Max 62 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/59 /Table/106/1/10 60 NULL +/Table/106/1/10 /Table/106/2/20 61 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/106/2/20 /Table/106/2/30 62 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/106/2/30 /Table/107/1/42 63 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/107/1/42 /Max 64 2262-04-11 23:47:16.854776 +0000 +0000 # Ditto, verbose form. query TTIIT colnames @@ -209,11 +209,11 @@ SELECT start_key, end_key, range_id, lease_holder, split_enforced_until FROM [SH ORDER BY range_id ---- start_key end_key range_id lease_holder split_enforced_until -/Table/57 /Table/106/1/10 58 1 NULL -/Table/106/1/10 /Table/106/2/20 59 1 2262-04-11 23:47:16.854776 +0000 +0000 -/Table/106/2/20 /Table/106/2/30 60 1 2262-04-11 23:47:16.854776 +0000 +0000 -/Table/106/2/30 /Table/107/1/42 61 1 2262-04-11 23:47:16.854776 +0000 +0000 -/Table/107/1/42 /Max 62 1 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/59 /Table/106/1/10 60 1 NULL +/Table/106/1/10 /Table/106/2/20 61 1 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/106/2/20 /Table/106/2/30 62 1 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/106/2/30 /Table/107/1/42 63 1 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/107/1/42 /Max 64 1 2262-04-11 23:47:16.854776 +0000 +0000 # Show that the new tables shows up in the full range list. query TTITTTITITT colnames @@ -227,13 +227,13 @@ start_key end_key range_id database_name schema_name table_na /Table/25 /Table/26 27 system public replication_constraint_stats 25 primary 1 /Table/25/1 /Table/25/2 /Table/26 /Table/27 28 system public replication_critical_localities 26 primary 1 /Table/26/1 /Table/26/2 /Table/27 /Table/28 29 system public replication_stats 27 primary 1 /Table/27/1 /Table/27/2 -/Table/57 /Table/106/1/10 58 test public t 106 t_pkey 1 /Table/106/1 /Table/106/2 -/Table/106/1/10 /Table/106/2/20 59 test public t 106 t_pkey 1 /Table/106/1 /Table/106/2 -/Table/106/1/10 /Table/106/2/20 59 test public t 106 idx 2 /Table/106/2 /Table/106/3 -/Table/106/2/20 /Table/106/2/30 60 test public t 106 idx 2 /Table/106/2 /Table/106/3 -/Table/106/2/30 /Table/107/1/42 61 test public t 106 idx 2 /Table/106/2 /Table/106/3 -/Table/106/2/30 /Table/107/1/42 61 test public u 107 u_pkey 1 /Table/107/1 /Table/107/2 -/Table/107/1/42 /Max 62 test public u 107 u_pkey 1 /Table/107/1 /Table/107/2 +/Table/59 /Table/106/1/10 60 test public t 106 t_pkey 1 /Table/106/1 /Table/106/2 +/Table/106/1/10 /Table/106/2/20 61 test public t 106 t_pkey 1 /Table/106/1 /Table/106/2 +/Table/106/1/10 /Table/106/2/20 61 test public t 106 idx 2 /Table/106/2 /Table/106/3 +/Table/106/2/20 /Table/106/2/30 62 test public t 106 idx 2 /Table/106/2 /Table/106/3 +/Table/106/2/30 /Table/107/1/42 63 test public t 106 idx 2 /Table/106/2 /Table/106/3 +/Table/106/2/30 /Table/107/1/42 63 test public u 107 u_pkey 1 /Table/107/1 /Table/107/2 +/Table/107/1/42 /Max 64 test public u 107 u_pkey 1 /Table/107/1 /Table/107/2 subtest show_ranges_from_database/with_tables @@ -265,12 +265,12 @@ FROM [SHOW RANGES WITH TABLES] ORDER BY range_id ---- start_key end_key range_id schema_name table_name table_id table_start_key table_end_key -/Table/57 /Table/106/1/10 58 public t 106 /Table/106 /Table/107 -/Table/106/1/10 /Table/106/2/20 59 public t 106 /Table/106 /Table/107 -/Table/106/2/20 /Table/106/2/30 60 public t 106 /Table/106 /Table/107 -/Table/106/2/30 /Table/107/1/42 61 public t 106 /Table/106 /Table/107 -/Table/106/2/30 /Table/107/1/42 61 public u 107 /Table/107 /Table/108 -/Table/107/1/42 /Max 62 public u 107 /Table/107 /Table/108 +/Table/59 /Table/106/1/10 60 public t 106 /Table/106 /Table/107 +/Table/106/1/10 /Table/106/2/20 61 public t 106 /Table/106 /Table/107 +/Table/106/2/20 /Table/106/2/30 62 public t 106 /Table/106 /Table/107 +/Table/106/2/30 /Table/107/1/42 63 public t 106 /Table/106 /Table/107 +/Table/106/2/30 /Table/107/1/42 63 public u 107 /Table/107 /Table/108 +/Table/107/1/42 /Max 64 public u 107 /Table/107 /Table/108 subtest show_ranges_from_database/with_indexes @@ -304,13 +304,13 @@ FROM [SHOW RANGES WITH INDEXES] ORDER BY range_id, table_id, index_id ---- start_key end_key range_id schema_name table_name table_id index_name index_id index_start_key index_end_key -/Table/57 /Table/106/1/10 58 public t 106 t_pkey 1 /Table/106/1 /Table/106/2 -/Table/106/1/10 /Table/106/2/20 59 public t 106 t_pkey 1 /Table/106/1 /Table/106/2 -/Table/106/1/10 /Table/106/2/20 59 public t 106 idx 2 /Table/106/2 /Table/106/3 -/Table/106/2/20 /Table/106/2/30 60 public t 106 idx 2 /Table/106/2 /Table/106/3 -/Table/106/2/30 /Table/107/1/42 61 public t 106 idx 2 /Table/106/2 /Table/106/3 -/Table/106/2/30 /Table/107/1/42 61 public u 107 u_pkey 1 /Table/107/1 /Table/107/2 -/Table/107/1/42 /Max 62 public u 107 u_pkey 1 /Table/107/1 /Table/107/2 +/Table/59 /Table/106/1/10 60 public t 106 t_pkey 1 /Table/106/1 /Table/106/2 +/Table/106/1/10 /Table/106/2/20 61 public t 106 t_pkey 1 /Table/106/1 /Table/106/2 +/Table/106/1/10 /Table/106/2/20 61 public t 106 idx 2 /Table/106/2 /Table/106/3 +/Table/106/2/20 /Table/106/2/30 62 public t 106 idx 2 /Table/106/2 /Table/106/3 +/Table/106/2/30 /Table/107/1/42 63 public t 106 idx 2 /Table/106/2 /Table/106/3 +/Table/106/2/30 /Table/107/1/42 63 public u 107 u_pkey 1 /Table/107/1 /Table/107/2 +/Table/107/1/42 /Max 64 public u 107 u_pkey 1 /Table/107/1 /Table/107/2 subtest show_ranges_from_table @@ -342,10 +342,10 @@ SELECT start_key, end_key, range_id, split_enforced_until FROM [SHOW RANGES FROM ORDER BY range_id ---- start_key end_key range_id split_enforced_until - …/1/10 58 NULL -…/1/10 …/2/20 59 2262-04-11 23:47:16.854776 +0000 +0000 -…/2/20 …/2/30 60 2262-04-11 23:47:16.854776 +0000 +0000 -…/2/30 61 2262-04-11 23:47:16.854776 +0000 +0000 + …/1/10 60 NULL +…/1/10 …/2/20 61 2262-04-11 23:47:16.854776 +0000 +0000 +…/2/20 …/2/30 62 2262-04-11 23:47:16.854776 +0000 +0000 +…/2/30 63 2262-04-11 23:47:16.854776 +0000 +0000 # Ditto, verbose form. query TTIIT colnames @@ -353,10 +353,10 @@ SELECT start_key, end_key, range_id, lease_holder, split_enforced_until FROM [SH ORDER BY range_id ---- start_key end_key range_id lease_holder split_enforced_until - …/1/10 58 1 NULL -…/1/10 …/2/20 59 1 2262-04-11 23:47:16.854776 +0000 +0000 -…/2/20 …/2/30 60 1 2262-04-11 23:47:16.854776 +0000 +0000 -…/2/30 61 1 2262-04-11 23:47:16.854776 +0000 +0000 + …/1/10 60 1 NULL +…/1/10 …/2/20 61 1 2262-04-11 23:47:16.854776 +0000 +0000 +…/2/20 …/2/30 62 1 2262-04-11 23:47:16.854776 +0000 +0000 +…/2/30 63 1 2262-04-11 23:47:16.854776 +0000 +0000 # Let's inspect the other table for comparison. query TTIT colnames @@ -364,8 +364,8 @@ SELECT start_key, end_key, range_id, split_enforced_until FROM [SHOW RANGES FROM ORDER BY range_id ---- start_key end_key range_id split_enforced_until - …/1/42 61 2262-04-11 23:47:16.854776 +0000 +0000 -…/1/42 62 2262-04-11 23:47:16.854776 +0000 +0000 + …/1/42 63 2262-04-11 23:47:16.854776 +0000 +0000 +…/1/42 64 2262-04-11 23:47:16.854776 +0000 +0000 @@ -398,11 +398,11 @@ SELECT start_key, end_key, range_id, index_name, index_id, index_start_key, inde ORDER BY range_id, index_id ---- start_key end_key range_id index_name index_id index_start_key index_end_key - …/1/10 58 t_pkey 1 …/1 …/2 -…/1/10 …/2/20 59 t_pkey 1 …/1 …/2 -…/1/10 …/2/20 59 idx 2 …/2 …/3 -…/2/20 …/2/30 60 idx 2 …/2 …/3 -…/2/30 61 idx 2 …/2 …/3 + …/1/10 60 t_pkey 1 …/1 …/2 +…/1/10 …/2/20 61 t_pkey 1 …/1 …/2 +…/1/10 …/2/20 61 idx 2 …/2 …/3 +…/2/20 …/2/30 62 idx 2 …/2 …/3 +…/2/30 63 idx 2 …/2 …/3 @@ -434,18 +434,18 @@ query TTIT colnames SELECT start_key, end_key, range_id, split_enforced_until FROM [SHOW RANGES FROM INDEX t@idx] ---- start_key end_key range_id split_enforced_until - …/20 59 2262-04-11 23:47:16.854776 +0000 +0000 -…/20 …/30 60 2262-04-11 23:47:16.854776 +0000 +0000 -…/30 61 2262-04-11 23:47:16.854776 +0000 +0000 + …/20 61 2262-04-11 23:47:16.854776 +0000 +0000 +…/20 …/30 62 2262-04-11 23:47:16.854776 +0000 +0000 +…/30 63 2262-04-11 23:47:16.854776 +0000 +0000 # Ditto, verbose form. query TTIIT colnames SELECT start_key, end_key, range_id, lease_holder, split_enforced_until FROM [SHOW RANGES FROM INDEX t@idx WITH DETAILS] ---- start_key end_key range_id lease_holder split_enforced_until - …/20 59 1 2262-04-11 23:47:16.854776 +0000 +0000 -…/20 …/30 60 1 2262-04-11 23:47:16.854776 +0000 +0000 -…/30 61 1 2262-04-11 23:47:16.854776 +0000 +0000 + …/20 61 1 2262-04-11 23:47:16.854776 +0000 +0000 +…/20 …/30 62 1 2262-04-11 23:47:16.854776 +0000 +0000 +…/30 63 1 2262-04-11 23:47:16.854776 +0000 +0000 subtest cast_error diff --git a/pkg/sql/logictest/testdata/logic_test/show_source b/pkg/sql/logictest/testdata/logic_test/show_source index c7621464c44a..149e5fbc8e12 100644 --- a/pkg/sql/logictest/testdata/logic_test/show_source +++ b/pkg/sql/logictest/testdata/logic_test/show_source @@ -267,9 +267,12 @@ public role_id_seq query TTTTT colnames,rowsort SELECT schema_name, table_name, type, owner, locality FROM [SHOW TABLES FROM system] +ORDER BY schema_name, table_name ---- schema_name table_name type owner locality public descriptor table NULL NULL +public tenant_tasks table NULL NULL +public task_payloads table NULL NULL public span_stats_tenant_boundaries table NULL NULL public span_stats_samples table NULL NULL public span_stats_buckets table NULL NULL @@ -318,54 +321,57 @@ public users table NULL NULL query TTTTTT colnames,rowsort SELECT schema_name, table_name, type, owner, locality, comment FROM [SHOW TABLES FROM system WITH COMMENT] +ORDER BY schema_name, table_name ---- schema_name table_name type owner locality comment -public table_statistics table NULL NULL · -public span_stats_samples table NULL NULL · -public span_configurations table NULL NULL · -public database_role_settings table NULL NULL · -public join_tokens table NULL NULL · -public scheduled_jobs table NULL NULL · -public locations table NULL NULL · -public jobs table NULL NULL · -public ui table NULL NULL · -public eventlog table NULL NULL · -public tenants table NULL NULL · -public descriptor_id_seq sequence NULL NULL · -public settings table NULL NULL · -public zones table NULL NULL · -public users table NULL NULL · public descriptor table NULL NULL · -public span_stats_buckets table NULL NULL · -public external_connections table NULL NULL · -public role_id_seq sequence NULL NULL · -public tenant_usage table NULL NULL · -public statement_diagnostics_requests table NULL NULL · -public role_options table NULL NULL · -public protected_ts_records table NULL NULL · -public namespace table NULL NULL · -public replication_critical_localities table NULL NULL · -public web_sessions table NULL NULL · -public rangelog table NULL NULL · +public tenant_tasks table NULL NULL · +public task_payloads table NULL NULL · public span_stats_tenant_boundaries table NULL NULL · +public span_stats_samples table NULL NULL · +public span_stats_buckets table NULL NULL · public span_stats_unique_keys table NULL NULL · +public job_info table NULL NULL · +public external_connections table NULL NULL · public privileges table NULL NULL · +public tenant_settings table NULL NULL · +public role_id_seq sequence NULL NULL · +public span_configurations table NULL NULL · public sql_instances table NULL NULL · +public tenant_usage table NULL NULL · +public database_role_settings table NULL NULL · public transaction_statistics table NULL NULL · public statement_statistics table NULL NULL · +public join_tokens table NULL NULL · public migrations table NULL NULL · public sqlliveness table NULL NULL · +public scheduled_jobs table NULL NULL · public statement_diagnostics table NULL NULL · +public statement_diagnostics_requests table NULL NULL · public statement_bundle_chunks table NULL NULL · +public role_options table NULL NULL · +public protected_ts_records table NULL NULL · public protected_ts_meta table NULL NULL · +public namespace table NULL NULL · +public reports_meta table NULL NULL · +public replication_stats table NULL NULL · +public replication_critical_localities table NULL NULL · public replication_constraint_stats table NULL NULL · public comments table NULL NULL · public role_members table NULL NULL · +public locations table NULL NULL · +public table_statistics table NULL NULL · +public web_sessions table NULL NULL · +public jobs table NULL NULL · +public ui table NULL NULL · +public rangelog table NULL NULL · +public eventlog table NULL NULL · public lease table NULL NULL · -public job_info table NULL NULL · -public tenant_settings table NULL NULL · -public reports_meta table NULL NULL · -public replication_stats table NULL NULL · +public tenants table NULL NULL · +public descriptor_id_seq sequence NULL NULL · +public settings table NULL NULL · +public zones table NULL NULL · +public users table NULL NULL · query ITTT colnames SELECT node_id, user_name, application_name, active_queries @@ -472,7 +478,7 @@ query TTTI colnames SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM CURRENT_CATALOG WITH DETAILS] ---- start_key end_key replicas lease_holder -/Table/57 /Max {1} 1 +/Table/59 /Max {1} 1 query TTTI colnames SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE system.descriptor WITH DETAILS] diff --git a/pkg/sql/logictest/testdata/logic_test/split_at b/pkg/sql/logictest/testdata/logic_test/split_at index 83afffe4ecfe..2f2e4ca7dcd4 100644 --- a/pkg/sql/logictest/testdata/logic_test/split_at +++ b/pkg/sql/logictest/testdata/logic_test/split_at @@ -7,9 +7,10 @@ CREATE TABLE t (a INT PRIMARY KEY) query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - {1} 1 + {1} 1 query TTT colnames ALTER TABLE t SPLIT AT VALUES (1), (10) @@ -20,10 +21,11 @@ key pretty split_enforced_until query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder + …/1/1 {1} 1 …/1/1 …/1/10 {1} 1 - …/1/1 {1} 1 …/1/10 {1} 1 statement ok diff --git a/pkg/sql/logictest/testdata/logic_test/system b/pkg/sql/logictest/testdata/logic_test/system index 58f006f5d7ab..0fc98942b688 100644 --- a/pkg/sql/logictest/testdata/logic_test/system +++ b/pkg/sql/logictest/testdata/logic_test/system @@ -50,7 +50,9 @@ public statement_diagnostics table NULL NULL public statement_diagnostics_requests table NULL NULL public statement_statistics table NULL NULL public table_statistics table NULL NULL +public task_payloads table NULL NULL public tenant_settings table NULL NULL +public tenant_tasks table NULL NULL public tenant_usage table NULL NULL public tenants table NULL NULL public transaction_statistics table NULL NULL @@ -112,8 +114,28 @@ public zones table NULL NULL # descriptor_id_sq, tenant, tenant_usage, and span_configurations. skipif config 3node-tenant-default-configs query I rowsort -SELECT id FROM system.descriptor +SELECT id FROM system.descriptor ORDER BY 1 ---- +1 +3 +4 +5 +6 +7 +8 +11 +12 +13 +14 +15 +19 +20 +21 +23 +24 +25 +26 +27 28 30 31 @@ -124,21 +146,6 @@ SELECT id FROM system.descriptor 36 37 39 -57 -100 -101 -102 -103 -104 -105 -11 -1 -3 -4 -5 -6 -7 -8 40 41 42 @@ -155,22 +162,19 @@ SELECT id FROM system.descriptor 54 55 56 -12 -13 -14 -15 -19 -20 -21 -23 -24 -25 -26 -27 +57 +58 +59 +100 +101 +102 +103 +104 +105 onlyif config 3node-tenant-default-configs query I rowsort -SELECT id FROM system.descriptor +SELECT id FROM system.descriptor ORDER BY 1 ---- 1 3 @@ -612,6 +616,14 @@ system public table_statistics root DELETE true system public table_statistics root INSERT true system public table_statistics root SELECT true system public table_statistics root UPDATE true +system public task_payloads admin DELETE true +system public task_payloads admin INSERT true +system public task_payloads admin SELECT true +system public task_payloads admin UPDATE true +system public task_payloads root DELETE true +system public task_payloads root INSERT true +system public task_payloads root SELECT true +system public task_payloads root UPDATE true system public tenant_settings admin DELETE true system public tenant_settings admin INSERT true system public tenant_settings admin SELECT true @@ -620,6 +632,14 @@ system public tenant_settings root DELETE true system public tenant_settings root INSERT true system public tenant_settings root SELECT true system public tenant_settings root UPDATE true +system public tenant_tasks admin DELETE true +system public tenant_tasks admin INSERT true +system public tenant_tasks admin SELECT true +system public tenant_tasks admin UPDATE true +system public tenant_tasks root DELETE true +system public tenant_tasks root INSERT true +system public tenant_tasks root SELECT true +system public tenant_tasks root UPDATE true system public tenant_usage admin DELETE true system public tenant_usage admin INSERT true system public tenant_usage admin SELECT true diff --git a/pkg/sql/logictest/testdata/logic_test/system_namespace b/pkg/sql/logictest/testdata/logic_test/system_namespace index b3bb35afbfc0..ca074d5de700 100644 --- a/pkg/sql/logictest/testdata/logic_test/system_namespace +++ b/pkg/sql/logictest/testdata/logic_test/system_namespace @@ -2,6 +2,30 @@ skipif config 3node-tenant-default-configs query IITI rowsort SELECT * FROM system.namespace ---- +0 0 defaultdb 100 +0 0 postgres 102 +0 0 system 1 +0 0 test 104 +1 0 public 29 +1 29 comments 24 +1 29 database_role_settings 44 +1 29 descriptor 3 +1 29 descriptor_id_seq 7 +1 29 eventlog 12 +1 29 external_connections 52 +1 29 job_info 53 +1 29 jobs 15 +1 29 join_tokens 41 +1 29 lease 11 +1 29 locations 21 +1 29 migrations 40 +1 29 namespace 30 +1 29 privileges 51 +1 29 protected_ts_meta 31 +1 29 protected_ts_records 32 +1 29 rangelog 13 +1 29 replication_constraint_stats 25 +1 29 replication_critical_localities 26 1 29 replication_stats 27 1 29 reports_meta 28 1 29 role_id_seq 48 @@ -21,35 +45,13 @@ SELECT * FROM system.namespace 1 29 statement_diagnostics_requests 35 1 29 statement_statistics 42 1 29 table_statistics 20 -1 29 locations 21 -0 0 defaultdb 100 -1 29 migrations 40 -1 29 namespace 30 -1 29 privileges 51 -1 29 protected_ts_meta 31 -1 29 protected_ts_records 32 -1 29 rangelog 13 -0 0 postgres 102 -0 0 system 1 -1 29 replication_constraint_stats 25 -1 29 replication_critical_localities 26 +1 29 task_payloads 58 1 29 tenant_settings 50 +1 29 tenant_tasks 59 1 29 tenant_usage 45 1 29 tenants 8 1 29 transaction_statistics 43 1 29 ui 14 -0 0 test 104 -1 0 public 29 -1 29 comments 24 -1 29 database_role_settings 44 -1 29 descriptor 3 -1 29 descriptor_id_seq 7 -1 29 eventlog 12 -1 29 external_connections 52 -1 29 job_info 53 -1 29 jobs 15 -1 29 join_tokens 41 -1 29 lease 11 1 29 users 4 1 29 web_sessions 19 1 29 zones 5 diff --git a/pkg/sql/multitenant_admin_function_test.go b/pkg/sql/multitenant_admin_function_test.go index 13408791c109..47db351575af 100644 --- a/pkg/sql/multitenant_admin_function_test.go +++ b/pkg/sql/multitenant_admin_function_test.go @@ -42,8 +42,8 @@ import ( const ( createTable = "CREATE TABLE t(i int PRIMARY KEY);" - systemKey = "\xc1" - systemKeyPretty = "/Table/57" + systemKey = "\xc3" + systemKeyPretty = "/Table/59" secondaryKeyPretty = "/Tenant/10" secondaryWithoutCapabilityKeyPretty = "/Tenant/20" maxTimestamp = "2262-04-11 23:47:16.854776 +0000 +0000" diff --git a/pkg/sql/opt/exec/execbuilder/testdata/autocommit b/pkg/sql/opt/exec/execbuilder/testdata/autocommit index 7cc802d1a7eb..834796362d9b 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/autocommit +++ b/pkg/sql/opt/exec/execbuilder/testdata/autocommit @@ -43,7 +43,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 1 CPut, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 CPut, 1 EndTxn to (n1,s1):1 # Multi-row insert should auto-commit. query B @@ -66,7 +66,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 2 CPut, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 2 CPut, 1 EndTxn to (n1,s1):1 # No auto-commit inside a transaction. statement ok @@ -90,7 +90,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 2 CPut to (n1,s1):1 +dist sender send r60: sending batch 2 CPut to (n1,s1):1 statement ok ROLLBACK @@ -116,7 +116,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 2 CPut, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 2 CPut, 1 EndTxn to (n1,s1):1 query B SELECT count(*) > 0 FROM [ @@ -139,7 +139,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- -dist sender send r58: sending batch 2 CPut, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 2 CPut, 1 EndTxn to (n1,s1):1 # Insert with RETURNING statement with side-effects should not auto-commit. # In this case division can (in principle) error out. @@ -164,8 +164,8 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- -dist sender send r58: sending batch 2 CPut to (n1,s1):1 -dist sender send r58: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 2 CPut to (n1,s1):1 +dist sender send r60: sending batch 1 EndTxn to (n1,s1):1 # Another way to test the scenario above: generate an error and ensure that the # mutation was not committed. @@ -202,7 +202,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 1 Put, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 Put, 1 EndTxn to (n1,s1):1 # Multi-row upsert should auto-commit. query B @@ -225,7 +225,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 2 Put, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 2 Put, 1 EndTxn to (n1,s1):1 # No auto-commit inside a transaction. statement ok @@ -249,7 +249,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 2 Put to (n1,s1):1 +dist sender send r60: sending batch 2 Put to (n1,s1):1 statement ok ROLLBACK @@ -275,7 +275,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 2 Put, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 2 Put, 1 EndTxn to (n1,s1):1 # TODO(radu): allow non-side-effecting projections. query B @@ -299,8 +299,8 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- -dist sender send r58: sending batch 2 Put to (n1,s1):1 -dist sender send r58: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 2 Put to (n1,s1):1 +dist sender send r60: sending batch 1 EndTxn to (n1,s1):1 # Upsert with RETURNING statement with side-effects should not auto-commit. # In this case division can (in principle) error out. @@ -325,8 +325,8 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- -dist sender send r58: sending batch 2 Put to (n1,s1):1 -dist sender send r58: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 2 Put to (n1,s1):1 +dist sender send r60: sending batch 1 EndTxn to (n1,s1):1 # Another way to test the scenario above: generate an error and ensure that the # mutation was not committed. @@ -363,8 +363,8 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 1 Scan to (n1,s1):1 -dist sender send r58: sending batch 2 Put, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 Scan to (n1,s1):1 +dist sender send r60: sending batch 2 Put, 1 EndTxn to (n1,s1):1 # No auto-commit inside a transaction. statement ok @@ -388,8 +388,8 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 1 Scan to (n1,s1):1 -dist sender send r58: sending batch 2 Put to (n1,s1):1 +dist sender send r60: sending batch 1 Scan to (n1,s1):1 +dist sender send r60: sending batch 2 Put to (n1,s1):1 statement ok ROLLBACK @@ -415,8 +415,8 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 1 Scan to (n1,s1):1 -dist sender send r58: sending batch 2 Put, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 Scan to (n1,s1):1 +dist sender send r60: sending batch 2 Put, 1 EndTxn to (n1,s1):1 # TODO(radu): allow non-side-effecting projections. query B @@ -440,9 +440,9 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- -dist sender send r58: sending batch 1 Scan to (n1,s1):1 -dist sender send r58: sending batch 2 Put to (n1,s1):1 -dist sender send r58: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 Scan to (n1,s1):1 +dist sender send r60: sending batch 2 Put to (n1,s1):1 +dist sender send r60: sending batch 1 EndTxn to (n1,s1):1 # Update with RETURNING statement with side-effects should not auto-commit. # In this case division can (in principle) error out. @@ -467,9 +467,9 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- -dist sender send r58: sending batch 1 Scan to (n1,s1):1 -dist sender send r58: sending batch 2 Put to (n1,s1):1 -dist sender send r58: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 Scan to (n1,s1):1 +dist sender send r60: sending batch 2 Put to (n1,s1):1 +dist sender send r60: sending batch 1 EndTxn to (n1,s1):1 # Another way to test the scenario above: generate an error and ensure that the # mutation was not committed. @@ -506,7 +506,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 1 Del, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 Del, 1 EndTxn to (n1,s1):1 # Multi-row delete should auto-commit. query B @@ -529,7 +529,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 1 DelRng, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 DelRng, 1 EndTxn to (n1,s1):1 # No auto-commit inside a transaction. statement ok @@ -553,7 +553,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 1 DelRng to (n1,s1):1 +dist sender send r60: sending batch 1 DelRng to (n1,s1):1 statement ok ROLLBACK @@ -579,8 +579,8 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 1 Scan to (n1,s1):1 -dist sender send r58: sending batch 2 Del, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 Scan to (n1,s1):1 +dist sender send r60: sending batch 2 Del, 1 EndTxn to (n1,s1):1 # TODO(radu): allow non-side-effecting projections. query B @@ -604,9 +604,9 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- -dist sender send r58: sending batch 1 Scan to (n1,s1):1 -dist sender send r58: sending batch 2 Del to (n1,s1):1 -dist sender send r58: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 Scan to (n1,s1):1 +dist sender send r60: sending batch 2 Del to (n1,s1):1 +dist sender send r60: sending batch 1 EndTxn to (n1,s1):1 # Insert with RETURNING statement with side-effects should not auto-commit. # In this case division can (in principle) error out. @@ -631,9 +631,9 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- -dist sender send r58: sending batch 1 Scan to (n1,s1):1 -dist sender send r58: sending batch 2 Del to (n1,s1):1 -dist sender send r58: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 Scan to (n1,s1):1 +dist sender send r60: sending batch 2 Del to (n1,s1):1 +dist sender send r60: sending batch 1 EndTxn to (n1,s1):1 statement ok INSERT INTO ab VALUES (12, 0); @@ -682,9 +682,9 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- -dist sender send r58: sending batch 2 CPut to (n1,s1):1 -dist sender send r58: sending batch 2 Get to (n1,s1):1 -dist sender send r58: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 2 CPut to (n1,s1):1 +dist sender send r60: sending batch 2 Get to (n1,s1):1 +dist sender send r60: sending batch 1 EndTxn to (n1,s1):1 query B SELECT count(*) > 0 FROM [ @@ -707,10 +707,10 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- -dist sender send r58: sending batch 1 Scan to (n1,s1):1 -dist sender send r58: sending batch 1 Put to (n1,s1):1 -dist sender send r58: sending batch 1 Scan to (n1,s1):1 -dist sender send r58: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 Scan to (n1,s1):1 +dist sender send r60: sending batch 1 Put to (n1,s1):1 +dist sender send r60: sending batch 1 Scan to (n1,s1):1 +dist sender send r60: sending batch 1 EndTxn to (n1,s1):1 query B SELECT count(*) > 0 FROM [ @@ -734,10 +734,10 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- -dist sender send r58: sending batch 1 Get to (n1,s1):1 -dist sender send r58: sending batch 1 Del to (n1,s1):1 -dist sender send r58: sending batch 1 Scan to (n1,s1):1 -dist sender send r58: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 Get to (n1,s1):1 +dist sender send r60: sending batch 1 Del to (n1,s1):1 +dist sender send r60: sending batch 1 Scan to (n1,s1):1 +dist sender send r60: sending batch 1 EndTxn to (n1,s1):1 # Test with a single cascade, which should use autocommit. statement ok @@ -767,9 +767,9 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- -dist sender send r58: sending batch 1 Del to (n1,s1):1 -dist sender send r58: sending batch 1 Scan to (n1,s1):1 -dist sender send r58: sending batch 1 Del, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 Del to (n1,s1):1 +dist sender send r60: sending batch 1 Scan to (n1,s1):1 +dist sender send r60: sending batch 1 Del, 1 EndTxn to (n1,s1):1 # ----------------------- # Multiple mutation tests @@ -799,9 +799,9 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- -dist sender send r58: sending batch 2 CPut to (n1,s1):1 -dist sender send r58: sending batch 2 CPut to (n1,s1):1 -dist sender send r58: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 2 CPut to (n1,s1):1 +dist sender send r60: sending batch 2 CPut to (n1,s1):1 +dist sender send r60: sending batch 1 EndTxn to (n1,s1):1 query B SELECT count(*) > 0 FROM [ @@ -826,9 +826,9 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- -dist sender send r58: sending batch 2 CPut to (n1,s1):1 -dist sender send r58: sending batch 2 CPut to (n1,s1):1 -dist sender send r58: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 2 CPut to (n1,s1):1 +dist sender send r60: sending batch 2 CPut to (n1,s1):1 +dist sender send r60: sending batch 1 EndTxn to (n1,s1):1 # Check that the statement can still be auto-committed when the txn rows written # erring guardrail is enabled. @@ -861,7 +861,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r58: sending batch 1 CPut, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 CPut, 1 EndTxn to (n1,s1):1 query error pq: txn has written 2 rows, which is above the limit INSERT INTO guardrails VALUES (2), (3) diff --git a/pkg/sql/opt/exec/execbuilder/testdata/delete b/pkg/sql/opt/exec/execbuilder/testdata/delete index 6870e7215d59..d7d17f1dca6d 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/delete +++ b/pkg/sql/opt/exec/execbuilder/testdata/delete @@ -231,9 +231,9 @@ SELECT operation, message FROM [SHOW KV TRACE FOR SESSION] WHERE message LIKE '%DelRange%' OR message LIKE '%DelRng%' ---- delete range DelRange /Table/110/1 - /Table/110/2 -dist sender send r58: sending batch 1 DelRng to (n1,s1):1 +dist sender send r60: sending batch 1 DelRng to (n1,s1):1 delete range DelRange /Table/110/1/601/0 - /Table/110/2 -dist sender send r58: sending batch 1 DelRng to (n1,s1):1 +dist sender send r60: sending batch 1 DelRng to (n1,s1):1 # Ensure that DelRange requests are autocommitted when DELETE FROM happens on a # chunk of fewer than 600 keys. @@ -252,7 +252,7 @@ SELECT operation, message FROM [SHOW KV TRACE FOR SESSION] WHERE message LIKE '%Del%' OR message LIKE '%sending batch%' ---- delete range Del /Table/110/1/5/0 -dist sender send r58: sending batch 1 Del, 1 EndTxn to (n1,s1):1 +dist sender send r60: sending batch 1 Del, 1 EndTxn to (n1,s1):1 # Ensure that we send DelRanges when doing a point delete operation on a table # that has multiple column families. @@ -271,7 +271,7 @@ SELECT operation, message FROM [SHOW KV TRACE FOR SESSION] WHERE message LIKE '%Del%' OR message LIKE '%sending batch%' ---- delete range DelRange /Table/111/1/5 - /Table/111/1/6 -dist sender send r58: sending batch 1 DelRng to (n1,s1):1 +dist sender send r60: sending batch 1 DelRng to (n1,s1):1 statement ok CREATE TABLE xyz ( diff --git a/pkg/sql/opt/exec/execbuilder/testdata/dist_vectorize b/pkg/sql/opt/exec/execbuilder/testdata/dist_vectorize index 651fd0b1911f..0cab5892ea2a 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/dist_vectorize +++ b/pkg/sql/opt/exec/execbuilder/testdata/dist_vectorize @@ -28,8 +28,9 @@ ALTER TABLE kw EXPERIMENTAL_RELOCATE SELECT ARRAY[i], i FROM generate_series(1, # Verify data placement. query TTTI rowsort SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE kv WITH DETAILS] +ORDER BY 1 ---- - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/2 {1} 1 …/1/2 …/1/3 {2} 2 …/1/3 …/1/4 {3} 3 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_agg b/pkg/sql/opt/exec/execbuilder/testdata/distsql_agg index 5b446d134d88..3410582a344e 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_agg +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_agg @@ -15,9 +15,10 @@ ALTER TABLE data EXPERIMENTAL_RELOCATE # Verify data placement. query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE data WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/2 {2} 2 …/1/2 …/1/3 {3} 3 …/1/3 …/1/4 {4} 4 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_distinct_on b/pkg/sql/opt/exec/execbuilder/testdata/distsql_distinct_on index 4b58bc5dbf26..dfb8654a5a83 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_distinct_on +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_distinct_on @@ -45,9 +45,10 @@ ALTER TABLE abc EXPERIMENTAL_RELOCATE VALUES query TTTI colnames SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE xyz WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/2 {1} 1 + …/1/2 {1} 1 …/1/2 …/1/4 {2} 2 …/1/4 …/1/6 {3} 3 …/1/6 …/1/7 {4} 4 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_group_join b/pkg/sql/opt/exec/execbuilder/testdata/distsql_group_join index b6bbad8f33c2..9dee28ae8fc3 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_group_join +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_group_join @@ -15,9 +15,10 @@ ALTER TABLE data EXPERIMENTAL_RELOCATE # Verify data placement. query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE data WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/2 {2} 2 …/1/2 …/1/3 {3} 3 …/1/3 …/1/4 {4} 4 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_indexjoin b/pkg/sql/opt/exec/execbuilder/testdata/distsql_indexjoin index 6f746f5abc1c..1b5ee2d4643a 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_indexjoin +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_indexjoin @@ -14,9 +14,10 @@ ALTER INDEX t@v EXPERIMENTAL_RELOCATE query TTTI colnames SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM INDEX t@v WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/10 {1} 1 + …/10 {1} 1 …/10 …/20 {2} 2 …/20 …/30 {3} 3 …/30 …/40 {4} 4 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_inverted_index b/pkg/sql/opt/exec/execbuilder/testdata/distsql_inverted_index index 106f9cc3e5b2..fb804ad7848c 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_inverted_index +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_inverted_index @@ -66,7 +66,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM INDEX json_tab@primary WITH DETAILS] ORDER BY lease_holder, start_key ---- start_key end_key replicas lease_holder - …/10 {1} 1 + …/10 {1} 1 …/10 …/20 {2} 2 …/20 …/ {3} 3 @@ -75,7 +75,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE json_tab WITH DETAILS] ORDER BY lease_holder, start_key ---- start_key end_key replicas lease_holder - …/1/10 {1} 1 + …/1/10 {1} 1 …/2 {1} 1 …/1/10 …/1/20 {2} 2 …/1/20 …/2 {3} 3 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_join b/pkg/sql/opt/exec/execbuilder/testdata/distsql_join index 2807e36b6752..7965c7828f7d 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_join +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_join @@ -15,9 +15,10 @@ ALTER TABLE data EXPERIMENTAL_RELOCATE # Verify data placement. query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE data WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/2 {2} 2 …/1/2 …/1/3 {3} 3 …/1/3 …/1/4 {4} 4 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join b/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join index 10194bf0102d..a0e7fa0e572f 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join @@ -104,9 +104,10 @@ ALTER TABLE grandchild2 EXPERIMENTAL_RELOCATE # Verify data placement. query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE parent1 WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/8 {1} 1 + …/1/8 {1} 1 …/1/8 …/1/16 {1} 1 …/1/16 …/1/24 {1} 1 …/1/24 …/1/32 {1} 1 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_misc b/pkg/sql/opt/exec/execbuilder/testdata/distsql_misc index eb132d8be0e9..c4e7ce35fbdf 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_misc +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_misc @@ -70,9 +70,10 @@ ALTER TABLE data EXPERIMENTAL_RELOCATE # Verify data placement. query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE data WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/2 {2} 2 …/1/2 …/1/3 {3} 3 …/1/3 …/1/4 {4} 4 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_numtables b/pkg/sql/opt/exec/execbuilder/testdata/distsql_numtables index 844b891c191c..2b9b27e98eb5 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_numtables +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_numtables @@ -25,15 +25,17 @@ ALTER TABLE NumToStr EXPERIMENTAL_RELOCATE # Verify data placement. query TTTI colnames SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE NumToSquare WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - {1} 1 + {1} 1 query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE NumToStr WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/2000 {1} 1 + …/1/2000 {1} 1 …/1/2000 …/1/4000 {2} 2 …/1/4000 …/1/6000 {3} 3 …/1/6000 …/1/8000 {4} 4 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_ordinality b/pkg/sql/opt/exec/execbuilder/testdata/distsql_ordinality index 6708857bf6e0..fa99c928ddf6 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_ordinality +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_ordinality @@ -22,9 +22,10 @@ ALTER TABLE xyz EXPERIMENTAL_RELOCATE VALUES query TTTI colnames SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE xyz WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/2 {1} 1 + …/1/2 {1} 1 …/1/2 …/1/4 {2} 2 …/1/4 …/1/6 {3} 3 …/1/6 …/1/7 {4} 4 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_tighten_spans b/pkg/sql/opt/exec/execbuilder/testdata/distsql_tighten_spans index 31922c1ed71c..d91d44f5f353 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_tighten_spans +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_tighten_spans @@ -97,7 +97,7 @@ SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE p ORDER BY lease_holder, start_key ---- start_key end_key replicas lease_holder - …/1/2 {1} 1 + …/1/2 {1} 1 …/1/2 …/2/0 {3} 3 …/2/0 …/2/2 {4} 4 …/2/2 {5} 5 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_union b/pkg/sql/opt/exec/execbuilder/testdata/distsql_union index 01b7446035b3..038ad92b280f 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_union +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_union @@ -20,9 +20,10 @@ ALTER TABLE xyz EXPERIMENTAL_RELOCATE VALUES query TTTI colnames SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE xyz WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/2 {1} 1 + …/1/2 {1} 1 …/1/2 …/1/3 {2} 2 …/1/3 …/1/4 {3} 3 …/1/4 …/1/5 {4} 4 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_window b/pkg/sql/opt/exec/execbuilder/testdata/distsql_window index 680bebe76aa5..e1d8bebabf62 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_window +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_window @@ -15,9 +15,10 @@ ALTER TABLE data EXPERIMENTAL_RELOCATE # Verify data placement. query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE data WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/2 {2} 2 …/1/2 …/1/3 {3} 3 …/1/3 …/1/4 {4} 4 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/experimental_distsql_planning_5node b/pkg/sql/opt/exec/execbuilder/testdata/experimental_distsql_planning_5node index 15e0b64e7c36..4b10fc7a1e7e 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/experimental_distsql_planning_5node +++ b/pkg/sql/opt/exec/execbuilder/testdata/experimental_distsql_planning_5node @@ -20,9 +20,10 @@ ALTER TABLE kw EXPERIMENTAL_RELOCATE SELECT ARRAY[i], i FROM generate_series(1, # Verify data placement. query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE kv WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/2 {1} 1 …/1/2 …/1/3 {2} 2 …/1/3 …/1/4 {3} 3 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/explain_analyze_plans b/pkg/sql/opt/exec/execbuilder/testdata/explain_analyze_plans index 84780f3870cf..e3bc05d4d408 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/explain_analyze_plans +++ b/pkg/sql/opt/exec/execbuilder/testdata/explain_analyze_plans @@ -34,9 +34,10 @@ ALTER TABLE kw EXPERIMENTAL_RELOCATE SELECT ARRAY[i], i FROM generate_series(1, # Verify data placement. query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE kv WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/2 {1} 1 …/1/2 …/1/3 {2} 2 …/1/3 …/1/4 {3} 3 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/inverted_filter_geospatial_dist b/pkg/sql/opt/exec/execbuilder/testdata/inverted_filter_geospatial_dist index 5d6975b37051..5900d132fbf7 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/inverted_filter_geospatial_dist +++ b/pkg/sql/opt/exec/execbuilder/testdata/inverted_filter_geospatial_dist @@ -101,9 +101,10 @@ ALTER INDEX geo_table@geom_index EXPERIMENTAL_RELOCATE VALUES (ARRAY[2], 1152921 query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM INDEX geo_table@geom_index WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1152921574000000000 {1} 1 + …/1152921574000000000 {1} 1 …/1152921574000000000 {2} 2 # Distributed. TODO(treilly): This claims to be distributed, but it isn't. What gives? @@ -170,9 +171,10 @@ ALTER INDEX geo_table@geom_index EXPERIMENTAL_RELOCATE VALUES (ARRAY[2], 1) query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM INDEX geo_table@geom_index WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1152921574000000000 {2} 2 + …/1152921574000000000 {2} 2 …/1152921574000000000 {2} 2 # Filtering is placed at node 2. We need a retry here to account for possibly @@ -241,9 +243,10 @@ SET CLUSTER SETTING sql.spatial.experimental_box2d_comparison_operators.enabled query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM INDEX geo_table@geom_index WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1152921574000000000 {2} 2 + …/1152921574000000000 {2} 2 …/1152921574000000000 {2} 2 query ITTTI colnames,rowsort @@ -251,7 +254,7 @@ SELECT range_id, start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FR ORDER BY lease_holder, start_key ---- range_id start_key end_key replicas lease_holder -58 {2} 2 +60 {2} 2 # We should see a distributed execution (though need to retry to purge possibly # stale dist sender caches). diff --git a/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_geospatial_dist b/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_geospatial_dist index 1399e8bd8388..c7ad098350b1 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_geospatial_dist +++ b/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_geospatial_dist @@ -39,7 +39,7 @@ query TTTI colnames SELECT start_key, end_key, replicas, lease_holder from [SHOW EXPERIMENTAL_RANGES FROM TABLE ltable WITH DETAILS] ORDER BY lease_holder ---- start_key end_key replicas lease_holder - …/1/2 {1} 1 + …/1/2 {1} 1 …/1/2 …/1/3 {2} 2 …/1/3 {3} 3 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_geospatial_dist_vec b/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_geospatial_dist_vec index 7965f94edd1f..58724b57a3f1 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_geospatial_dist_vec +++ b/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_geospatial_dist_vec @@ -39,7 +39,7 @@ query TTTI colnames SELECT start_key, end_key, replicas, lease_holder from [SHOW EXPERIMENTAL_RANGES FROM TABLE ltable WITH DETAILS] ORDER BY lease_holder ---- start_key end_key replicas lease_holder - …/1/2 {1} 1 + …/1/2 {1} 1 …/1/2 …/1/3 {2} 2 …/1/3 {3} 3 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_json_array_dist b/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_json_array_dist index 2c8a19e61f1e..65a812d45cc4 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_json_array_dist +++ b/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_json_array_dist @@ -65,7 +65,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM INDEX json_tab@primary WITH DETAILS] ORDER BY lease_holder, start_key ---- start_key end_key replicas lease_holder - …/10 {1} 1 + …/10 {1} 1 …/10 …/20 {2} 2 …/20 …/ {3} 3 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_multi_column_dist b/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_multi_column_dist index b244f33cba91..100d72c8995f 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_multi_column_dist +++ b/pkg/sql/opt/exec/execbuilder/testdata/inverted_join_multi_column_dist @@ -81,7 +81,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW EXPERIMENTAL_RANGES FROM TABLE j2 WITH DETAILS] ORDER BY lease_holder ---- start_key end_key replicas lease_holder - …/1/44 {1} 1 + …/1/44 {1} 1 …/1/44 …/1/88 {2} 2 …/1/88 {3} 3 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/lookup_join b/pkg/sql/opt/exec/execbuilder/testdata/lookup_join index 3ce0777d0069..c30f8d8a81a2 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/lookup_join +++ b/pkg/sql/opt/exec/execbuilder/testdata/lookup_join @@ -426,9 +426,10 @@ ALTER TABLE data EXPERIMENTAL_RELOCATE # Verify data placement. query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE data WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/2 {2} 2 …/1/2 …/1/3 {3} 3 …/1/3 …/1/4 {4} 4 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/merge_join_dist_vec b/pkg/sql/opt/exec/execbuilder/testdata/merge_join_dist_vec index 0b2a290dd46e..41806bc57b2e 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/merge_join_dist_vec +++ b/pkg/sql/opt/exec/execbuilder/testdata/merge_join_dist_vec @@ -30,7 +30,7 @@ query TTTI colnames SELECT start_key, end_key, replicas, lease_holder from [SHOW EXPERIMENTAL_RANGES FROM TABLE l WITH DETAILS] ORDER BY lease_holder ---- start_key end_key replicas lease_holder - …/1/2 {1} 1 + …/1/2 {1} 1 …/1/2 …/1/3 {2} 2 …/1/3 {3} 3 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/scan_parallel b/pkg/sql/opt/exec/execbuilder/testdata/scan_parallel index 709c07abfbba..9c769549545c 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/scan_parallel +++ b/pkg/sql/opt/exec/execbuilder/testdata/scan_parallel @@ -15,9 +15,10 @@ ALTER TABLE data EXPERIMENTAL_RELOCATE # Verify data placement. query TTTI colnames,rowsort SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE data WITH DETAILS] +ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/1 {1} 1 + …/1/1 {1} 1 …/1/1 …/1/2 {2} 2 …/1/2 …/1/3 {3} 3 …/1/3 …/1/4 {4} 4 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/show_trace b/pkg/sql/opt/exec/execbuilder/testdata/show_trace index 0086daaa9cf2..aaf92cca9301 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/show_trace +++ b/pkg/sql/opt/exec/execbuilder/testdata/show_trace @@ -228,7 +228,7 @@ SET tracing = off query T SELECT message FROM [SHOW TRACE FOR SESSION] WHERE message LIKE e'%1 CPut, 1 EndTxn%' AND message NOT LIKE e'%proposing command%' ---- -r59: sending batch 1 CPut, 1 EndTxn to (n1,s1):1 +r61: sending batch 1 CPut, 1 EndTxn to (n1,s1):1 node received request: 1 CPut, 1 EndTxn # Check that we can run set tracing regardless of the current tracing state. @@ -312,9 +312,9 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r59: sending batch 1 CPut to (n1,s1):1 -dist sender send r59: sending batch 1 EndTxn to (n1,s1):1 -dist sender send r59: sending batch 2 CPut, 1 EndTxn to (n1,s1):1 +dist sender send r61: sending batch 1 CPut to (n1,s1):1 +dist sender send r61: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r61: sending batch 2 CPut, 1 EndTxn to (n1,s1):1 # Make another session trace. statement ok @@ -343,9 +343,9 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r59: sending batch 4 CPut, 1 EndTxn to (n1,s1):1 -dist sender send r59: sending batch 5 CPut to (n1,s1):1 -dist sender send r59: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r61: sending batch 4 CPut, 1 EndTxn to (n1,s1):1 +dist sender send r61: sending batch 5 CPut to (n1,s1):1 +dist sender send r61: sending batch 1 EndTxn to (n1,s1):1 # make a table with some big strings in it. statement ok @@ -366,11 +366,11 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r59: sending batch 6 CPut to (n1,s1):1 -dist sender send r59: sending batch 6 CPut to (n1,s1):1 -dist sender send r59: sending batch 6 CPut to (n1,s1):1 -dist sender send r59: sending batch 6 CPut to (n1,s1):1 -dist sender send r59: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r61: sending batch 6 CPut to (n1,s1):1 +dist sender send r61: sending batch 6 CPut to (n1,s1):1 +dist sender send r61: sending batch 6 CPut to (n1,s1):1 +dist sender send r61: sending batch 6 CPut to (n1,s1):1 +dist sender send r61: sending batch 1 EndTxn to (n1,s1):1 statement ok CREATE TABLE streamer (pk INT PRIMARY KEY, attribute INT, blob TEXT, INDEX(attribute), FAMILY (pk, attribute, blob)); @@ -399,4 +399,4 @@ WHERE message LIKE '%r$rangeid: sending batch 42 Get%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- -dist sender send r59: sending batch 42 Get to (n1,s1):1 +dist sender send r61: sending batch 42 Get to (n1,s1):1 diff --git a/pkg/sql/pgwire/testdata/pgtest/enum b/pkg/sql/pgwire/testdata/pgtest/enum index 675bb253f403..60f960aed0aa 100644 --- a/pkg/sql/pgwire/testdata/pgtest/enum +++ b/pkg/sql/pgwire/testdata/pgtest/enum @@ -10,7 +10,7 @@ # The first table created has id 58. send crdb_only -Parse {"Name": "s1", "Query": "SELECT $1", "ParameterOIDs": [100058]} +Parse {"Name": "s1", "Query": "SELECT $1", "ParameterOIDs": [100080]} Sync ---- diff --git a/pkg/sql/sem/catconstants/constants.go b/pkg/sql/sem/catconstants/constants.go index 62dd1dd901e8..68825699f33d 100644 --- a/pkg/sql/sem/catconstants/constants.go +++ b/pkg/sql/sem/catconstants/constants.go @@ -82,7 +82,9 @@ const ( TenantUsageTableName SystemTableName = "tenant_usage" SQLInstancesTableName SystemTableName = "sql_instances" SpanConfigurationsTableName SystemTableName = "span_configurations" + TaskPayloadsTableName SystemTableName = "task_payloads" TenantSettingsTableName SystemTableName = "tenant_settings" + TenantTasksTableName SystemTableName = "tenant_tasks" SpanCountTableName SystemTableName = "span_count" SystemPrivilegeTableName SystemTableName = "privileges" SystemExternalConnectionsTableName SystemTableName = "external_connections" diff --git a/pkg/sql/tests/testdata/initial_keys b/pkg/sql/tests/testdata/initial_keys index 80012d77ccdc..7606a5170e19 100644 --- a/pkg/sql/tests/testdata/initial_keys +++ b/pkg/sql/tests/testdata/initial_keys @@ -1,6 +1,6 @@ initial-keys tenant=system ---- -109 keys: +113 keys: /System/"desc-idgen" /Table/3/1/1/2/1 /Table/3/1/3/2/1 @@ -49,6 +49,8 @@ initial-keys tenant=system /Table/3/1/55/2/1 /Table/3/1/56/2/1 /Table/3/1/57/2/1 + /Table/3/1/58/2/1 + /Table/3/1/59/2/1 /Table/5/1/0/2/1 /Table/5/1/1/2/1 /Table/5/1/16/2/1 @@ -101,7 +103,9 @@ initial-keys tenant=system /NamespaceTable/30/1/1/29/"statement_diagnostics_requests"/4/1 /NamespaceTable/30/1/1/29/"statement_statistics"/4/1 /NamespaceTable/30/1/1/29/"table_statistics"/4/1 + /NamespaceTable/30/1/1/29/"task_payloads"/4/1 /NamespaceTable/30/1/1/29/"tenant_settings"/4/1 + /NamespaceTable/30/1/1/29/"tenant_tasks"/4/1 /NamespaceTable/30/1/1/29/"tenant_usage"/4/1 /NamespaceTable/30/1/1/29/"tenants"/4/1 /NamespaceTable/30/1/1/29/"transaction_statistics"/4/1 @@ -110,7 +114,7 @@ initial-keys tenant=system /NamespaceTable/30/1/1/29/"web_sessions"/4/1 /NamespaceTable/30/1/1/29/"zones"/4/1 /Table/48/1/0/0 -52 splits: +54 splits: /Table/3 /Table/4 /Table/5 @@ -163,6 +167,8 @@ initial-keys tenant=system /Table/55 /Table/56 /Table/57 + /Table/58 + /Table/59 initial-keys tenant=5 ---- diff --git a/pkg/ts/catalog/chart_catalog.go b/pkg/ts/catalog/chart_catalog.go index fee438f35b9b..fdb57b8f1f01 100644 --- a/pkg/ts/catalog/chart_catalog.go +++ b/pkg/ts/catalog/chart_catalog.go @@ -3645,6 +3645,17 @@ var charts = []sectionDescription{ "jobs.poll_jobs_stats.resume_retry_error", }, }, + { + Title: "Auto Config Runner Job", + Metrics: []string{ + "jobs.auto_config_runner.fail_or_cancel_completed", + "jobs.auto_config_runner.fail_or_cancel_failed", + "jobs.auto_config_runner.fail_or_cancel_retry_error", + "jobs.auto_config_runner.resume_completed", + "jobs.auto_config_runner.resume_failed", + "jobs.auto_config_runner.resume_retry_error", + }, + }, }, }, { diff --git a/pkg/upgrade/upgradebase/testing_knobs.go b/pkg/upgrade/upgradebase/testing_knobs.go index 6019fa51a38c..50a46c99b1e9 100644 --- a/pkg/upgrade/upgradebase/testing_knobs.go +++ b/pkg/upgrade/upgradebase/testing_knobs.go @@ -38,6 +38,11 @@ type TestingKnobs struct { // job from being created. SkipJobMetricsPollingJobBootstrap bool + // SkipAutoConfigRunnerJobBootstrap, if set, disables the + // clusterversion.V23_1_CreateAutoConfigRunnerJob upgrade, which prevents a + // job from being created. + SkipAutoConfigRunnerJobBootstrap bool + // AfterRunPermanentUpgrades is called after each call to // RunPermanentUpgrades. AfterRunPermanentUpgrades func() diff --git a/pkg/upgrade/upgrades/BUILD.bazel b/pkg/upgrade/upgrades/BUILD.bazel index cfba95b260aa..b05acdb18d6f 100644 --- a/pkg/upgrade/upgrades/BUILD.bazel +++ b/pkg/upgrade/upgrades/BUILD.bazel @@ -8,8 +8,10 @@ go_library( "alter_sql_instances_sql_addr.go", "alter_table_statistics_partial_predicate_and_id.go", "backfill_jobs_info_table_migration.go", + "create_auto_config_runner_job.go", "create_index_usage_statement_statistics.go", "create_jobs_metrics_polling_job.go", + "create_task_system_tables.go", "database_role_settings_table_user_id_migration.go", "delete_descriptors_of_dropped_functions.go", "desc_id_sequence_for_system_tenant.go", @@ -89,6 +91,7 @@ go_test( "alter_table_statistics_partial_predicate_and_id_test.go", "backfill_jobs_info_table_migration_test.go", "builtins_test.go", + "create_auto_config_runner_job_test.go", "create_index_usage_statement_statistics_test.go", "create_jobs_metrics_polling_job_test.go", "database_role_settings_table_user_id_migration_test.go", diff --git a/pkg/upgrade/upgrades/create_auto_config_runner_job.go b/pkg/upgrade/upgrades/create_auto_config_runner_job.go new file mode 100644 index 000000000000..c0802094faa7 --- /dev/null +++ b/pkg/upgrade/upgrades/create_auto_config_runner_job.go @@ -0,0 +1,72 @@ +// Copyright 2022 The Cockroach Authors. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.txt. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0, included in the file +// licenses/APL.txt. + +package upgrades + +import ( + "context" + + "github.com/cockroachdb/cockroach/pkg/clusterversion" + "github.com/cockroachdb/cockroach/pkg/jobs" + "github.com/cockroachdb/cockroach/pkg/jobs/jobspb" + _ "github.com/cockroachdb/cockroach/pkg/jobs/metricspoller" // Ensure job implementation is linked. + "github.com/cockroachdb/cockroach/pkg/security/username" + "github.com/cockroachdb/cockroach/pkg/sql/isql" + "github.com/cockroachdb/cockroach/pkg/sql/sessiondata" + "github.com/cockroachdb/cockroach/pkg/upgrade" +) + +func createAutoConfigRunnerJob( + ctx context.Context, _ clusterversion.ClusterVersion, d upgrade.TenantDeps, +) error { + if d.TestingKnobs != nil && d.TestingKnobs.SkipAutoConfigRunnerJobBootstrap { + return nil + } + + if err := d.DB.Txn(ctx, func(ctx context.Context, txn isql.Txn) error { + row, err := d.DB.Executor().QueryRowEx( + ctx, + "check for existing auto config runner job", + nil, + sessiondata.RootUserSessionDataOverride, + "SELECT 1 FROM system.jobs WHERE id = $1", + jobs.AutoConfigRunnerJobID, + ) + if err != nil { + return err + } + + if row != nil { + // Job already exists. Nothing to do. + return nil + } + + jr := jobs.Record{ + JobID: jobs.AutoConfigRunnerJobID, + Description: "applies automatic configuration", + Details: jobspb.AutoConfigRunnerDetails{}, + Progress: jobspb.AutoConfigRunnerProgress{}, + CreatedBy: &jobs.CreatedByInfo{Name: username.RootUser, ID: username.RootUserID}, + Username: username.RootUserName(), + NonCancelable: true, + } + // Use CreateJob instead of CreateAdoptableJob to ensure this node + // has a claim on the job and can start it immediately below. + _, err = d.JobRegistry.CreateJobWithTxn(ctx, jr, jobs.AutoConfigRunnerJobID, txn) + return err + }); err != nil { + return err + } + + // Start the job immediately. This speeds up the application + // of initial configuration tasks. + d.JobRegistry.NotifyToResume(ctx, jobs.AutoConfigRunnerJobID) + return nil +} diff --git a/pkg/upgrade/upgrades/create_auto_config_runner_job_test.go b/pkg/upgrade/upgrades/create_auto_config_runner_job_test.go new file mode 100644 index 000000000000..3dd519f8a8f5 --- /dev/null +++ b/pkg/upgrade/upgrades/create_auto_config_runner_job_test.go @@ -0,0 +1,69 @@ +// Copyright 2022 The Cockroach Authors. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.txt. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0, included in the file +// licenses/APL.txt. + +package upgrades_test + +import ( + "context" + "testing" + + "github.com/cockroachdb/cockroach/pkg/base" + "github.com/cockroachdb/cockroach/pkg/clusterversion" + "github.com/cockroachdb/cockroach/pkg/server" + "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" + "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" + "github.com/cockroachdb/cockroach/pkg/util/leaktest" + "github.com/cockroachdb/cockroach/pkg/util/log" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestCreateAutoConfigRunnerJob(t *testing.T) { + defer leaktest.AfterTest(t)() + defer log.Scope(t).Close(t) + + clusterArgs := base.TestClusterArgs{ + ServerArgs: base.TestServerArgs{ + Knobs: base.TestingKnobs{ + Server: &server.TestingKnobs{ + DisableAutomaticVersionUpgrade: make(chan struct{}), + BinaryVersionOverride: clusterversion.ByKey( + clusterversion.V23_1_CreateAutoConfigRunnerJob - 1), + }, + }, + }, + } + + var ( + ctx = context.Background() + tc = testcluster.StartTestCluster(t, 1, clusterArgs) + sqlDB = tc.ServerConn(0) + ) + defer tc.Stopper().Stop(ctx) + + var count int + row := sqlDB.QueryRow("SELECT count(*) FROM crdb_internal.jobs WHERE job_type = 'AUTO CONFIG RUNNER'") + err := row.Scan(&count) + require.NoError(t, err) + assert.Equal(t, count, 0) + + upgrades.Upgrade( + t, + sqlDB, + clusterversion.V23_1_CreateAutoConfigRunnerJob, + nil, /* done */ + false, /* expectError */ + ) + + row = sqlDB.QueryRow("SELECT count(*) FROM crdb_internal.jobs WHERE job_type = 'AUTO CONFIG RUNNER'") + err = row.Scan(&count) + require.NoError(t, err) + assert.Equal(t, count, 1) +} diff --git a/pkg/upgrade/upgrades/create_task_system_tables.go b/pkg/upgrade/upgrades/create_task_system_tables.go new file mode 100644 index 000000000000..6062f3929b8f --- /dev/null +++ b/pkg/upgrade/upgrades/create_task_system_tables.go @@ -0,0 +1,43 @@ +// Copyright 2022 The Cockroach Authors. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.txt. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0, included in the file +// licenses/APL.txt. + +package upgrades + +import ( + "context" + + "github.com/cockroachdb/cockroach/pkg/clusterversion" + "github.com/cockroachdb/cockroach/pkg/keys" + "github.com/cockroachdb/cockroach/pkg/sql/catalog" + "github.com/cockroachdb/cockroach/pkg/sql/catalog/systemschema" + "github.com/cockroachdb/cockroach/pkg/upgrade" +) + +// createTaskSystemTables creates the system.task_payloads and +// system.tenant_tasks tables. +func createTaskSystemTables( + ctx context.Context, _ clusterversion.ClusterVersion, d upgrade.SystemDeps, +) error { + + tables := []catalog.TableDescriptor{ + systemschema.SystemTaskPayloadsTable, + systemschema.SystemTenantTasksTable, + } + + for _, table := range tables { + err := createSystemTable(ctx, d.DB.KV(), d.Settings, keys.SystemSQLCodec, + table) + if err != nil { + return err + } + } + + return nil +} diff --git a/pkg/upgrade/upgrades/key_visualizer_migration.go b/pkg/upgrade/upgrades/key_visualizer_migration.go index bcc4b37dc22b..d2f274480c7d 100644 --- a/pkg/upgrade/upgrades/key_visualizer_migration.go +++ b/pkg/upgrade/upgrades/key_visualizer_migration.go @@ -17,7 +17,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/jobs" "github.com/cockroachdb/cockroach/pkg/jobs/jobspb" "github.com/cockroachdb/cockroach/pkg/keys" - // Import keyvisjob so that it's init function will be called. + // Import keyvisjob so that its init function will be called. _ "github.com/cockroachdb/cockroach/pkg/keyvisualizer/keyvisjob" "github.com/cockroachdb/cockroach/pkg/security/username" "github.com/cockroachdb/cockroach/pkg/sql/catalog" diff --git a/pkg/upgrade/upgrades/upgrades.go b/pkg/upgrade/upgrades/upgrades.go index 7a5be9f237da..0f5128abbbfa 100644 --- a/pkg/upgrade/upgrades/upgrades.go +++ b/pkg/upgrade/upgrades/upgrades.go @@ -282,6 +282,16 @@ var upgrades = []upgradebase.Upgrade{ checkForPausedGCJobs, waitForDelRangeInGCJob, ), + upgrade.NewSystemUpgrade( + "create system.tenant_tasks and system.task_payloads", + toCV(clusterversion.V23_1_TaskSystemTables), + createTaskSystemTables, + ), + upgrade.NewPermanentTenantUpgrade("create auto config runner job", + toCV(clusterversion.V23_1_CreateAutoConfigRunnerJob), + createAutoConfigRunnerJob, + "create auto config runner job", + ), } func init() { diff --git a/pkg/util/rangedesc/testdata/scoped_iteration b/pkg/util/rangedesc/testdata/scoped_iteration index 4fff409941c5..1478a37fd831 100644 --- a/pkg/util/rangedesc/testdata/scoped_iteration +++ b/pkg/util/rangedesc/testdata/scoped_iteration @@ -57,35 +57,37 @@ scan - r55:/Table/5{4-5} - r56:/Table/5{5-6} - r57:/Table/5{6-7} -- r58:/{Table/57-Max} -scan through /M{in-ax} (page-size=1) found 58/58 descriptors +- r58:/Table/5{7-8} +- r59:/Table/5{8-9} +- r60:/{Table/59-Max} +scan through /M{in-ax} (page-size=1) found 60/60 descriptors scan scope=1 ---- - r2:/System/NodeLiveness{-Max} -scan through /System/NodeLiveness{-Max} (page-size=1) found 1/58 descriptors +scan through /System/NodeLiveness{-Max} (page-size=1) found 1/60 descriptors scan scope=2 ---- - r4:/System{/tsd-tse} -scan through /System{/tsd-tse} (page-size=1) found 1/58 descriptors +scan through /System{/tsd-tse} (page-size=1) found 1/60 descriptors scan scope=3 ---- - r1:/{Meta1/-System/NodeLiveness} -scan through /M{in-eta2/} (page-size=1) found 1/58 descriptors +scan through /M{in-eta2/} (page-size=1) found 1/60 descriptors scan scope=4 ---- - r1:/{Meta1/-System/NodeLiveness} -scan through /{Meta1/-System} (page-size=1) found 1/58 descriptors +scan through /{Meta1/-System} (page-size=1) found 1/60 descriptors scan scope=5 ---- - r7:/Table/{3-4} - r8:/Table/{4-5} - r9:/Table/{5-6} -scan through /Table/{3-6} (page-size=1) found 3/58 descriptors +scan through /Table/{3-6} (page-size=1) found 3/60 descriptors scan scope=6 ---- @@ -99,7 +101,7 @@ scan scope=6 - r47:/Table/4{5-6} - r48:/Table/4{6-7} - r49:/Table/4{7-8} -scan through /Table/{38-48} (page-size=1) found 10/58 descriptors +scan through /Table/{38-48} (page-size=1) found 10/60 descriptors scan scope=7 ---- @@ -155,5 +157,7 @@ scan scope=7 - r55:/Table/5{4-5} - r56:/Table/5{5-6} - r57:/Table/5{6-7} -- r58:/{Table/57-Max} -scan through /Table/{0-Max} (page-size=1) found 53/58 descriptors +- r58:/Table/5{7-8} +- r59:/Table/5{8-9} +- r60:/{Table/59-Max} +scan through /Table/{0-Max} (page-size=1) found 55/60 descriptors diff --git a/pkg/util/rangedesc/testdata/scoped_iteration_with_page_size b/pkg/util/rangedesc/testdata/scoped_iteration_with_page_size index 9fca7af10d60..da39773b2ea0 100644 --- a/pkg/util/rangedesc/testdata/scoped_iteration_with_page_size +++ b/pkg/util/rangedesc/testdata/scoped_iteration_with_page_size @@ -57,18 +57,20 @@ scan page-size=3 - r55:/Table/5{4-5} - r56:/Table/5{5-6} - r57:/Table/5{6-7} -- r58:/{Table/57-Max} -scan through /M{in-ax} (page-size=3) found 58/58 descriptors +- r58:/Table/5{7-8} +- r59:/Table/5{8-9} +- r60:/{Table/59-Max} +scan through /M{in-ax} (page-size=3) found 60/60 descriptors scan scope=1 page-size=5 ---- - r2:/System/NodeLiveness{-Max} -scan through /System/NodeLiveness{-Max} (page-size=5) found 1/58 descriptors +scan through /System/NodeLiveness{-Max} (page-size=5) found 1/60 descriptors scan scope=1 page-size=500 ---- - r2:/System/NodeLiveness{-Max} -scan through /System/NodeLiveness{-Max} (page-size=500) found 1/58 descriptors +scan through /System/NodeLiveness{-Max} (page-size=500) found 1/60 descriptors scan scope=6 page-size=4 ---- @@ -82,4 +84,4 @@ scan scope=6 page-size=4 - r47:/Table/4{5-6} - r48:/Table/4{6-7} - r49:/Table/4{7-8} -scan through /Table/{38-48} (page-size=4) found 10/58 descriptors +scan through /Table/{38-48} (page-size=4) found 10/60 descriptors diff --git a/pkg/util/rangedesc/testdata/scoped_iteration_with_splits b/pkg/util/rangedesc/testdata/scoped_iteration_with_splits index d510d4eaf786..fddc5f7507f6 100644 --- a/pkg/util/rangedesc/testdata/scoped_iteration_with_splits +++ b/pkg/util/rangedesc/testdata/scoped_iteration_with_splits @@ -7,8 +7,8 @@ splitting at /Meta2/"middle" scan ---- - r1:/Meta{1/-2/} -- r59:/Meta2/{-middle} -- r60:/{Meta2/middle-System/NodeLiveness} +- r61:/Meta2/{-middle} +- r62:/{Meta2/middle-System/NodeLiveness} - r2:/System/NodeLiveness{-Max} - r3:/System/{NodeLivenessMax-tsd} - r4:/System{/tsd-tse} @@ -65,19 +65,21 @@ scan - r55:/Table/5{4-5} - r56:/Table/5{5-6} - r57:/Table/5{6-7} -- r58:/{Table/57-Max} -scan through /M{in-ax} (page-size=1) found 60/60 descriptors +- r58:/Table/5{7-8} +- r59:/Table/5{8-9} +- r60:/{Table/59-Max} +scan through /M{in-ax} (page-size=1) found 62/62 descriptors # Scanning through just meta1 is unnaffected by these splits. scan scope=3 ---- - r1:/Meta{1/-2/} -scan through /M{in-eta2/} (page-size=1) found 1/60 descriptors +scan through /M{in-eta2/} (page-size=1) found 1/62 descriptors # Scanning through both meta{1,2} does surface these descriptors. scan scope=4 page-size=2 ---- - r1:/Meta{1/-2/} -- r59:/Meta2/{-middle} -- r60:/{Meta2/middle-System/NodeLiveness} -scan through /{Meta1/-System} (page-size=2) found 3/60 descriptors +- r61:/Meta2/{-middle} +- r62:/{Meta2/middle-System/NodeLiveness} +scan through /{Meta1/-System} (page-size=2) found 3/62 descriptors