diff --git a/docs/generated/settings/settings-for-tenants.txt b/docs/generated/settings/settings-for-tenants.txt index 9865a8e72109..9a5a5fa8dd2a 100644 --- a/docs/generated/settings/settings-for-tenants.txt +++ b/docs/generated/settings/settings-for-tenants.txt @@ -292,4 +292,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 22.2-98 set the active cluster version in the format '.' +version version 22.2-100 set the active cluster version in the format '.' diff --git a/docs/generated/settings/settings.html b/docs/generated/settings/settings.html index 09384a4f8eff..4c1b3a5a0acb 100644 --- a/docs/generated/settings/settings.html +++ b/docs/generated/settings/settings.html @@ -244,6 +244,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
version22.2-98set the active cluster version in the format '<major>.<minor>' +
version
version22.2-100set the active cluster version in the format '<major>.<minor>' diff --git a/pkg/ccl/backupccl/backup_test.go b/pkg/ccl/backupccl/backup_test.go index f58396af8723..0e46f94a712f 100644 --- a/pkg/ccl/backupccl/backup_test.go +++ b/pkg/ccl/backupccl/backup_test.go @@ -6845,7 +6845,13 @@ func TestBackupRestoreTenant(t *testing.T) { defer log.Scope(t).Close(t) params := base.TestClusterArgs{ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals()}, + Knobs: base.TestingKnobs{ + JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(), + TenantTestingKnobs: &sql.TenantTestingKnobs{ + // The tests expect specific tenant IDs to show up. + EnableTenantIDReuse: true, + }, + }, // Disabled to probabilistically spin up a tenant in each server because the // test explicitly sets up tenants to test on. @@ -7158,6 +7164,13 @@ func TestBackupRestoreTenant(t *testing.T) { // system.tenants table. Disable the default test tenant because // it's not necessary. DisableDefaultTestTenant: true, + Knobs: base.TestingKnobs{ + JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(), + TenantTestingKnobs: &sql.TenantTestingKnobs{ + // This test expects a specific tenant ID to be selected after DROP TENANT. + EnableTenantIDReuse: true, + }, + }, }}, ) @@ -9577,7 +9590,13 @@ func TestProtectRestoreTargets(t *testing.T) { numAccounts := 100 params := base.TestClusterArgs{ ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals()}, + Knobs: base.TestingKnobs{ + JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(), + TenantTestingKnobs: &sql.TenantTestingKnobs{ + // The tests expect specific tenant IDs to show up. + EnableTenantIDReuse: true, + }, + }, }, } tc, sqlDB, tempDir, cleanupFn := backupRestoreTestSetupWithParams(t, singleNode, diff --git a/pkg/ccl/backupccl/datadriven_test.go b/pkg/ccl/backupccl/datadriven_test.go index 24ab9e333b85..f8021fe01f22 100644 --- a/pkg/ccl/backupccl/datadriven_test.go +++ b/pkg/ccl/backupccl/datadriven_test.go @@ -153,6 +153,11 @@ func (d *datadrivenTestState) addCluster(t *testing.T, cfg clusterCfg) error { params.ServerArgs.DisableDefaultTestTenant = cfg.disableTenant params.ServerArgs.Knobs = base.TestingKnobs{ JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(), + TenantTestingKnobs: &sql.TenantTestingKnobs{ + // The tests in this package are particular about the tenant IDs + // they get in CREATE TENANT. + EnableTenantIDReuse: true, + }, } settings := cluster.MakeTestingClusterSettings() diff --git a/pkg/ccl/backupccl/restore_job.go b/pkg/ccl/backupccl/restore_job.go index 5b0964ca745f..0dceda9c8c09 100644 --- a/pkg/ccl/backupccl/restore_job.go +++ b/pkg/ccl/backupccl/restore_job.go @@ -1218,6 +1218,7 @@ func createImportingDescriptors( &tenantInfoCopy, initialTenantZoneConfig, false, /* ifNotExists */ + p.ExecCfg().TenantTestingKnobs, ); err != nil { return err } diff --git a/pkg/ccl/backupccl/system_schema.go b/pkg/ccl/backupccl/system_schema.go index f6e029330cad..b35bb28dd615 100644 --- a/pkg/ccl/backupccl/system_schema.go +++ b/pkg/ccl/backupccl/system_schema.go @@ -790,6 +790,9 @@ var systemTableBackupConfiguration = map[string]systemBackupConfiguration{ systemschema.DescIDSequence.GetName(): { shouldIncludeInClusterBackup: optOutOfClusterBackup, }, + systemschema.TenantIDSequence.GetName(): { + shouldIncludeInClusterBackup: optOutOfClusterBackup, + }, systemschema.SystemJobInfoTable.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 2ceb5a442920..2097d6d088c0 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant +++ b/pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant @@ -340,12 +340,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 ---- -63 /Tenant/10 /Tenant/11 1 +64 /Tenant/10 /Tenant/11 1 query ITT SELECT range_id, start_pretty, end_pretty FROM crdb_internal.ranges_no_leases ---- -63 /Tenant/10 /Tenant/11 +64 /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 9e1e19dffc83..7bc6164d24fc 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 @@ -329,7 +329,7 @@ skipif config multiregion-9node-3region-3azs-vec-off query I retry SELECT DISTINCT range_id FROM [SHOW RANGES FROM TABLE messages_rbr] ---- -65 +66 # 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 97a30b72b2f6..62bc92a9b10b 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 @@ -406,7 +406,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM INDEX r 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 af4b14ae3af3..5191f2017674 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/basic +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/basic @@ -68,6 +68,7 @@ upsert /Table/5{8-9} database system (host) upsert /Table/{59-60} database system (host) upsert /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true upsert /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +upsert /Table/6{2-3} database system (host) exec-sql CREATE DATABASE db; @@ -118,6 +119,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 @@ -225,6 +227,8 @@ 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 +delete /Table/6{2-3} +upsert /Table/6{2-3} 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 4fa6fca021c8..d71e292fb3db 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/indexes +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/indexes @@ -35,6 +35,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} database system (host) /Table/10{6-7} range default exec-sql @@ -70,6 +71,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 @@ -107,6 +109,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 @@ -134,6 +137,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 @@ -175,3 +179,4 @@ state offset=46 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} database system (host) diff --git a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/basic b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/basic index 4916d268ee08..af1bab8f094f 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/basic +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/basic @@ -36,6 +36,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} database system (host) /Tenant/10{-\x00} database system (tenant) /Tenant/11{-\x00} database system (tenant) /Tenant/12{-\x00} database system (tenant) @@ -110,6 +111,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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) @@ -179,6 +181,7 @@ upsert /Tenant/10/Table/11{3-4} range default state offset=81 ---- ... +/Tenant/10/NamespaceTable/{30-Max} database system (tenant) /Tenant/10/{NamespaceTable/Max-Table/32} database system (tenant) /Tenant/10/Table/3{2-3} database system (tenant) /Tenant/10/Table/3{3-4} database system (tenant) diff --git a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/protectedts b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/protectedts index 703977cdee71..5ec3386896b2 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/protectedts +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/protectedts @@ -33,6 +33,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 12136b2a5851..7c6eb251c752 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/range_tenants +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/range_tenants @@ -52,6 +52,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 @@ -82,6 +83,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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) @@ -164,6 +166,7 @@ mutations discard tenant=11 state offset=81 ---- ... +/Tenant/10/NamespaceTable/{30-Max} database system (tenant) /Tenant/10/{NamespaceTable/Max-Table/32} database system (tenant) /Tenant/10/Table/3{2-3} database system (tenant) /Tenant/10/Table/3{3-4} 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 2cdc814d3c51..f9bae6ad20af 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/tenant_end_key_split +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/multitenant/tenant_end_key_split @@ -19,6 +19,7 @@ state offset=59 ... /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} database system (host) /Tenant/11{-\x00} database system (tenant) /Tenant/12{-\x00} database system (tenant) @@ -37,8 +38,8 @@ state offset=60 limit=3 ---- ... /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} database system (host) /Tenant/11{-/Table/4} database system (tenant) -/Tenant/11/Table/{4-5} database system (tenant) ... # Peek near the end of the span_configurations table where tenant=11's records @@ -47,6 +48,7 @@ state offset=60 limit=3 state offset=103 ---- ... +/Tenant/11/Table/5{6-7} database system (tenant) /Tenant/11/Table/5{7-8} database system (tenant) /Tenant/11/Table/5{8-9} database system (tenant) /Tenant/11/Table/{59-60} database system (tenant) @@ -117,7 +119,7 @@ state offset=59 limit=5 ... /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 9b30e10cddf6..32314b72df04 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/named_zones +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/named_zones @@ -138,6 +138,7 @@ state offset=46 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} database system (host) /Table/10{6-7} ttl_seconds=50 # Make sure future descendants observe the same. @@ -167,6 +168,7 @@ state offset=46 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 efba633ec57f..2c9f96eb3fb0 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/partitions +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/partitions @@ -27,6 +27,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} database system (host) exec-sql CREATE DATABASE db; @@ -60,6 +61,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} database system (host) /Table/10{6-7} range default # All parent schema zone config changes cascade to the entire table's span. @@ -90,6 +92,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 @@ -125,6 +128,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 @@ -160,6 +164,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 @@ -209,6 +214,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 @@ -256,6 +262,7 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 @@ -297,3 +304,4 @@ state offset=47 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} database system (host) diff --git a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/protectedts b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/protectedts index 0316f130a3d1..9d48d87a7a83 100644 --- a/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/protectedts +++ b/pkg/ccl/spanconfigccl/spanconfigreconcilerccl/testdata/protectedts @@ -90,6 +90,7 @@ state offset=51 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} database system (host) /Table/10{6-7} protection_policies=[{ts: 3} {ts: 4}] /Table/10{7-8} protection_policies=[{ts: 3} {ts: 4}] @@ -142,6 +143,7 @@ state offset=57 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} database system (host) /Table/10{6-7} protection_policies=[{ts: 3} {ts: 4}] /Table/10{7-8} protection_policies=[{ts: 3} {ts: 4}] @@ -160,5 +162,6 @@ state offset=57 /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 c100a93157e6..68f01bd6042f 100644 --- a/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/full_translate +++ b/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/full_translate @@ -84,6 +84,7 @@ full-translate /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} 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 52ffa1c51eb8..087d3d155cc5 100644 --- a/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/full_translate_named_zones_deleted +++ b/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/full_translate_named_zones_deleted @@ -107,3 +107,4 @@ full-translate /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} database system (host) diff --git a/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/system_database b/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/system_database index b8d69a9c2dca..c613002334cf 100644 --- a/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/system_database +++ b/pkg/ccl/spanconfigccl/spanconfigsqltranslatorccl/testdata/system_database @@ -60,6 +60,7 @@ translate database=system /Table/{59-60} database system (host) /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=5 rangefeed_enabled=true +/Table/6{2-3} database system (host) # Alter zone config fields on the database to ensure the effects cascade. exec-sql @@ -124,6 +125,7 @@ translate database=system /Table/{59-60} ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true +/Table/6{2-3} 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. @@ -194,3 +196,4 @@ full-translate /Table/{59-60} ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true /Table/6{0-1} ttl_seconds=3600 ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true /Table/6{1-2} ttl_seconds=3600 ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true +/Table/6{2-3} ignore_strict_gc=true num_replicas=7 rangefeed_enabled=true diff --git a/pkg/ccl/streamingccl/replicationtestutils/testutils.go b/pkg/ccl/streamingccl/replicationtestutils/testutils.go index 7a57b42eeb38..37ef3db73e72 100644 --- a/pkg/ccl/streamingccl/replicationtestutils/testutils.go +++ b/pkg/ccl/streamingccl/replicationtestutils/testutils.go @@ -231,6 +231,11 @@ func CreateTenantStreamingClusters( }, Streaming: args.TestingKnobs, TenantCapabilitiesTestingKnobs: args.TenantCapabilitiesTestingKnobs, + TenantTestingKnobs: &sql.TenantTestingKnobs{ + // The streaming tests want tenant ID stability. So we want + // easy-to-predict IDs when we create a tenant after a drop. + EnableTenantIDReuse: true, + }, }, } diff --git a/pkg/ccl/streamingccl/streamingest/replication_random_client_test.go b/pkg/ccl/streamingccl/streamingest/replication_random_client_test.go index 39ecb91d7cc4..c609272e97bf 100644 --- a/pkg/ccl/streamingccl/streamingest/replication_random_client_test.go +++ b/pkg/ccl/streamingccl/streamingest/replication_random_client_test.go @@ -29,6 +29,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/kv/kvserver" "github.com/cockroachdb/cockroach/pkg/roachpb" clustersettings "github.com/cockroachdb/cockroach/pkg/settings/cluster" + "github.com/cockroachdb/cockroach/pkg/sql" "github.com/cockroachdb/cockroach/pkg/sql/execinfrapb" "github.com/cockroachdb/cockroach/pkg/storage" "github.com/cockroachdb/cockroach/pkg/testutils" @@ -177,6 +178,8 @@ func TestStreamIngestionJobWithRandomClient(t *testing.T) { const oldTenantID = 10 oldTenantName := roachpb.TenantName("10") // The destination tenant is going to be assigned ID 2. + // TODO(ssd,knz): This is a hack, we should really retrieve the tenant ID + // from beyond the point CREATE TENANT has run below. const newTenantID = 2 rekeyer, err := backupccl.MakeKeyRewriterFromRekeys(keys.MakeSQLCodec(roachpb.MustMakeTenantID(oldTenantID)), nil /* tableRekeys */, []execinfrapb.TenantRekey{{ @@ -205,6 +208,12 @@ func TestStreamIngestionJobWithRandomClient(t *testing.T) { // Test hangs with test tenant. More investigation is required. // Tracked with #76378. DisableDefaultTestTenant: true, + Knobs: base.TestingKnobs{ + TenantTestingKnobs: &sql.TenantTestingKnobs{ + // Needed to pin down the ID of the replication target. + EnableTenantIDReuse: true, + }, + }, }, } params.ServerArgs.Knobs.Store = &kvserver.StoreTestingKnobs{ @@ -246,6 +255,13 @@ func TestStreamIngestionJobWithRandomClient(t *testing.T) { _, err = conn.Exec(query) require.NoError(t, err) + + // Check that the tenant ID that was created is the one we expect. + var tenantID int + err = conn.QueryRow(`SELECT id FROM system.tenants WHERE name = '30'`).Scan(&tenantID) + require.NoError(t, err) + require.Equal(t, newTenantID, tenantID) + _, ingestionJobID := replicationtestutils.GetStreamJobIds(t, ctx, sqlDB, "30") // Start the ingestion stream and wait for at least one AddSSTable to ensure the job is running. diff --git a/pkg/ccl/streamingccl/streamingest/stream_ingestion_planning.go b/pkg/ccl/streamingccl/streamingest/stream_ingestion_planning.go index 6594dd45660a..43d7cf24b514 100644 --- a/pkg/ccl/streamingccl/streamingest/stream_ingestion_planning.go +++ b/pkg/ccl/streamingccl/streamingest/stream_ingestion_planning.go @@ -211,6 +211,7 @@ func ingestionPlanHook( p.ExecCfg().SpanConfigKVAccessor.WithTxn(ctx, p.Txn()), tenantInfo, initialTenantZoneConfig, ingestionStmt.IfNotExists, + p.ExecCfg().TenantTestingKnobs, ) if err != nil { return err diff --git a/pkg/cli/testdata/declarative-rules/deprules b/pkg/cli/testdata/declarative-rules/deprules index 0f283b22b7e0..baa8701ebdf5 100644 --- a/pkg/cli/testdata/declarative-rules/deprules +++ b/pkg/cli/testdata/declarative-rules/deprules @@ -1,6 +1,6 @@ dep ---- -debug declarative-print-rules 22.2-98 dep +debug declarative-print-rules 22.2-100 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 cf8911588fbe..4fdc87d21543 100644 --- a/pkg/cli/testdata/declarative-rules/oprules +++ b/pkg/cli/testdata/declarative-rules/oprules @@ -1,6 +1,6 @@ op ---- -debug declarative-print-rules 22.2-98 op +debug declarative-print-rules 22.2-100 op rules ---- [] diff --git a/pkg/cli/testdata/doctor/test_examine_cluster b/pkg/cli/testdata/doctor/test_examine_cluster index a38c001051db..d1f9f1bb36e1 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 57 descriptors and 56 namespace entries... +Examining 58 descriptors and 57 namespace entries... ParentID 100, ParentSchemaID 101: relation "foo" (105): expected matching namespace entry, found none Examining 18 jobs... ERROR: validation failed diff --git a/pkg/cli/testdata/zip/partial1 b/pkg/cli/testdata/zip/partial1 index b647bcae2a59..ed32db2aac9c 100644 --- a/pkg/cli/testdata/zip/partial1 +++ b/pkg/cli/testdata/zip/partial1 @@ -117,7 +117,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] 62 ranges found +[node 1] 63 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 @@ -180,6 +180,7 @@ debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null [node 1] writing range 60... converting to JSON... writing binary output: debug/nodes/1/ranges/60.json... done [node 1] writing range 61... converting to JSON... writing binary output: debug/nodes/1/ranges/61.json... done [node 1] writing range 62... converting to JSON... writing binary output: debug/nodes/1/ranges/62.json... done +[node 1] writing range 63... converting to JSON... writing binary output: debug/nodes/1/ranges/63.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... @@ -318,7 +319,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] 62 ranges found +[node 3] 63 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 @@ -381,6 +382,7 @@ debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null [node 3] writing range 60... converting to JSON... writing binary output: debug/nodes/3/ranges/60.json... done [node 3] writing range 61... converting to JSON... writing binary output: debug/nodes/3/ranges/61.json... done [node 3] writing range 62... converting to JSON... writing binary output: debug/nodes/3/ranges/62.json... done +[node 3] writing range 63... converting to JSON... writing binary output: debug/nodes/3/ranges/63.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 0b34e4242ecd..eb1428185327 100644 --- a/pkg/cli/testdata/zip/partial1_excluded +++ b/pkg/cli/testdata/zip/partial1_excluded @@ -117,7 +117,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] 62 ranges found +[node 1] 63 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 @@ -180,6 +180,7 @@ debug zip /dev/null --concurrency=1 --exclude-nodes=2 --cpu-profile-duration=0 [node 1] writing range 60... converting to JSON... writing binary output: debug/nodes/1/ranges/60.json... done [node 1] writing range 61... converting to JSON... writing binary output: debug/nodes/1/ranges/61.json... done [node 1] writing range 62... converting to JSON... writing binary output: debug/nodes/1/ranges/62.json... done +[node 1] writing range 63... converting to JSON... writing binary output: debug/nodes/1/ranges/63.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://... @@ -221,7 +222,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] 62 ranges found +[node 3] 63 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 @@ -284,6 +285,7 @@ debug zip /dev/null --concurrency=1 --exclude-nodes=2 --cpu-profile-duration=0 [node 3] writing range 60... converting to JSON... writing binary output: debug/nodes/3/ranges/60.json... done [node 3] writing range 61... converting to JSON... writing binary output: debug/nodes/3/ranges/61.json... done [node 3] writing range 62... converting to JSON... writing binary output: debug/nodes/3/ranges/62.json... done +[node 3] writing range 63... converting to JSON... writing binary output: debug/nodes/3/ranges/63.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 ffeffece24d5..a0ec0990495b 100644 --- a/pkg/cli/testdata/zip/partial2 +++ b/pkg/cli/testdata/zip/partial2 @@ -117,7 +117,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] 62 ranges found +[node 1] 63 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 @@ -180,6 +180,7 @@ debug zip --concurrency=1 --cpu-profile-duration=0 /dev/null [node 1] writing range 60... converting to JSON... writing binary output: debug/nodes/1/ranges/60.json... done [node 1] writing range 61... converting to JSON... writing binary output: debug/nodes/1/ranges/61.json... done [node 1] writing range 62... converting to JSON... writing binary output: debug/nodes/1/ranges/62.json... done +[node 1] writing range 63... converting to JSON... writing binary output: debug/nodes/1/ranges/63.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 @@ -220,7 +221,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] 62 ranges found +[node 3] 63 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 @@ -283,6 +284,7 @@ debug zip --concurrency=1 --cpu-profile-duration=0 /dev/null [node 3] writing range 60... converting to JSON... writing binary output: debug/nodes/3/ranges/60.json... done [node 3] writing range 61... converting to JSON... writing binary output: debug/nodes/3/ranges/61.json... done [node 3] writing range 62... converting to JSON... writing binary output: debug/nodes/3/ranges/62.json... done +[node 3] writing range 63... converting to JSON... writing binary output: debug/nodes/3/ranges/63.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 4d8442ca3858..43ef4448be76 100644 --- a/pkg/cli/testdata/zip/testzip +++ b/pkg/cli/testdata/zip/testzip @@ -117,7 +117,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] 62 ranges found +[node 1] 63 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 @@ -180,6 +180,7 @@ debug zip --concurrency=1 --cpu-profile-duration=1s /dev/null [node 1] writing range 60... converting to JSON... writing binary output: debug/nodes/1/ranges/60.json... done [node 1] writing range 61... converting to JSON... writing binary output: debug/nodes/1/ranges/61.json... done [node 1] writing range 62... converting to JSON... writing binary output: debug/nodes/1/ranges/62.json... done +[node 1] writing range 63... converting to JSON... writing binary output: debug/nodes/1/ranges/63.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 4b0e44797615..83b22b4f4963 100644 --- a/pkg/cli/testdata/zip/testzip_concurrent +++ b/pkg/cli/testdata/zip/testzip_concurrent @@ -243,7 +243,7 @@ zip [cluster] using SQL address: ... [cluster] using SQL address: ... [node 1] 1 log file ... -[node 1] 62 ranges found +[node 1] 63 ranges found [node 1] [log file ... [node 1] [log file ... [node 1] [log file ... @@ -595,6 +595,10 @@ zip [node 1] writing range 62: converting to JSON... [node 1] writing range 62: done [node 1] writing range 62: writing binary output: debug/nodes/1/ranges/62.json... +[node 1] writing range 63... +[node 1] writing range 63: converting to JSON... +[node 1] writing range 63: done +[node 1] writing range 63: writing binary output: debug/nodes/1/ranges/63.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... @@ -611,7 +615,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] 62 ranges found +[node 2] 63 ranges found [node 2] [log file ... [node 2] [log file ... [node 2] [log file ... @@ -963,6 +967,10 @@ zip [node 2] writing range 62: converting to JSON... [node 2] writing range 62: done [node 2] writing range 62: writing binary output: debug/nodes/2/ranges/62.json... +[node 2] writing range 63... +[node 2] writing range 63: converting to JSON... +[node 2] writing range 63: done +[node 2] writing range 63: writing binary output: debug/nodes/2/ranges/63.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... @@ -979,7 +987,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] 62 ranges found +[node 3] 63 ranges found [node 3] [log file ... [node 3] [log file ... [node 3] [log file ... @@ -1331,6 +1339,10 @@ zip [node 3] writing range 62: converting to JSON... [node 3] writing range 62: done [node 3] writing range 62: writing binary output: debug/nodes/3/ranges/62.json... +[node 3] writing range 63... +[node 3] writing range 63: converting to JSON... +[node 3] writing range 63: done +[node 3] writing range 63: writing binary output: debug/nodes/3/ranges/63.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/testdata/zip/testzip_shared_process_tenant b/pkg/cli/testdata/zip/testzip_shared_process_tenant index ead2b34b595c..01eb43b1c6d5 100644 --- a/pkg/cli/testdata/zip/testzip_shared_process_tenant +++ b/pkg/cli/testdata/zip/testzip_shared_process_tenant @@ -117,7 +117,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] 64 ranges found +[node 1] 65 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 @@ -182,6 +182,7 @@ debug zip --concurrency=1 --cpu-profile-duration=1s /dev/null [node 1] writing range 62... converting to JSON... writing binary output: debug/nodes/1/ranges/62.json... done [node 1] writing range 63... converting to JSON... writing binary output: debug/nodes/1/ranges/63.json... done [node 1] writing range 64... converting to JSON... writing binary output: debug/nodes/1/ranges/64.json... done +[node 1] writing range 65... converting to JSON... writing binary output: debug/nodes/1/ranges/65.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/clusterversion/cockroach_versions.go b/pkg/clusterversion/cockroach_versions.go index 834f4cda3f85..cdf4cde8ca00 100644 --- a/pkg/clusterversion/cockroach_versions.go +++ b/pkg/clusterversion/cockroach_versions.go @@ -520,6 +520,10 @@ const ( // SQL Stats tables. V23_1ChangeSQLStatsTTL + // V23_1_TenantIDSequence is the version where system.tenant_id_seq + // was introduced. + V23_1_TenantIDSequence + // ************************************************* // Step (1): Add new versions here. // Do not add new versions to a patch release. @@ -901,6 +905,10 @@ var rawVersionsSingleton = keyedVersions{ Key: V23_1ChangeSQLStatsTTL, Version: roachpb.Version{Major: 22, Minor: 2, Internal: 98}, }, + { + Key: V23_1_TenantIDSequence, + Version: roachpb.Version{Major: 22, Minor: 2, Internal: 100}, + }, // ************************************************* // Step (2): Add new versions here. diff --git a/pkg/server/admin_test.go b/pkg/server/admin_test.go index b4809968692d..3523f21765ac 100644 --- a/pkg/server/admin_test.go +++ b/pkg/server/admin_test.go @@ -658,6 +658,7 @@ func TestRangeCount(t *testing.T) { // sequences as well? m[fmt.Sprintf("public.%s", catconstants.DescIDSequenceTableName)] = 1 m[fmt.Sprintf("public.%s", catconstants.RoleIDSequenceName)] = 1 + m[fmt.Sprintf("public.%s", catconstants.TenantIDSequenceTableName)] = 1 return m } diff --git a/pkg/sql/catalog/bootstrap/metadata.go b/pkg/sql/catalog/bootstrap/metadata.go index 6ebcb022e7e9..71008bb9542a 100644 --- a/pkg/sql/catalog/bootstrap/metadata.go +++ b/pkg/sql/catalog/bootstrap/metadata.go @@ -470,6 +470,7 @@ func addSystemDescriptorsToSchema(target *MetadataSchema) { target.AddDescriptorForSystemTenant(systemschema.SystemTenantTasksTable) target.AddDescriptor(systemschema.StatementActivityTable) target.AddDescriptor(systemschema.TransactionActivityTable) + target.AddDescriptorForSystemTenant(systemschema.TenantIDSequence) // Adding a new system table? It should be added here to the metadata schema, // and also created as a migration for older clusters. @@ -481,7 +482,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 = 50 +const NumSystemTablesForSystemTenant = 51 // 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 dc1ed0c515b1..e74a798b94bb 100644 --- a/pkg/sql/catalog/bootstrap/testdata/testdata +++ b/pkg/sql/catalog/bootstrap/testdata/testdata @@ -1,4 +1,4 @@ -system hash=ee4948433fe6f52eb605592ea5e05129f74c0a66f9151f649531e8d4ad454db3 +system hash=c6edc5345881dbb799e6e5339ae6b211c33db2ff635788862083293cb4594f88 ---- [{"key":"04646573632d696467656e","value":"01c801"} ,{"key":"8b"} @@ -53,6 +53,7 @@ system hash=ee4948433fe6f52eb605592ea5e05129f74c0a66f9151f649531e8d4ad454db3 ,{"key":"8b89c38a89","value":"030ae6050a0c74656e616e745f7461736b73183b200128013a00422e0a0974656e616e745f696410011a0c08011040180030005014600020003000680070007800800100880100980100422b0a0669737375657210021a0c08071000180030005019600020003000680070007800800100880100980100422c0a077461736b5f696410031a0c0801104018003000501460002000300068007000780080010088010098010042420a076372656174656410041a0d080910001800300050a009600020002a136e6f7728293a3a3a54494d455354414d50545a3000680070007800800100880100980100422f0a0a7061796c6f61645f696410051a0c08071000180030005019600020003000680070007800800100880100980100422a0a056f776e657210061a0c08071000180030005019600020003000680070007800800100880100980100422d0a086f776e65725f696410071a0c080c100018003000501a600020003000680070007800800100880100980100480852a7010a077072696d61727910011801220974656e616e745f6964220669737375657222077461736b5f69642a07637265617465642a0a7061796c6f61645f69642a056f776e65722a086f776e65725f69643001300230034000400040004a10080010001a00200028003000380040005a0070047005700670077a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2015d0a077072696d61727910001a0974656e616e745f69641a066973737565721a077461736b5f69641a07637265617465641a0a7061796c6f61645f69641a056f776e65721a086f776e65725f696420012002200320042005200620072800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} ,{"key":"8b89c48a89","value":"030a92180a1273746174656d656e745f6163746976697479183c200128013a0042330a0d616767726567617465645f747310011a0d080910001800300050a00960002000300068007000780080010088010098010042330a0e66696e6765727072696e745f696410021a0c08081000180030005011600020003000680070007800800100880100980100423f0a1a7472616e73616374696f6e5f66696e6765727072696e745f696410031a0c08081000180030005011600020003000680070007800800100880100980100422e0a09706c616e5f6861736810041a0c08081000180030005011600020003000680070007800800100880100980100422d0a086170705f6e616d6510051a0c0807100018003000501960002000300068007000780080010088010098010042380a0c6167675f696e74657276616c10061a13080610001800300050a20960006a040800100020003000680070007800800100880100980100422e0a086d6574616461746110071a0d081210001800300050da1d60002000300068007000780080010088010098010042300a0a7374617469737469637310081a0d081210001800300050da1d600020003000680070007800800100880100980100422a0a04706c616e10091a0d081210001800300050da1d600020003000680070007800800100880100980100425f0a15696e6465785f7265636f6d6d656e646174696f6e73100a1a1d080f100018003000380750f1075a0c080710001800300050196000600020002a1241525241595b5d3a3a3a535452494e475b5d300068007000780080010088010098010042340a0f657865637574696f6e5f636f756e74100b1a0c08011040180030005014600020003000680070007800800100880100980100423d0a17657865637574696f6e5f746f74616c5f7365636f6e6473100c1a0d080210401800300050bd0560002000300068007000780080010088010098010042450a1f657865637574696f6e5f746f74616c5f636c75737465725f7365636f6e6473100d1a0d080210401800300050bd0560002000300068007000780080010088010098010042410a1b636f6e74656e74696f6e5f74696d655f6176675f7365636f6e6473100e1a0d080210401800300050bd0560002000300068007000780080010088010098010042370a116370755f73716c5f6176675f6e616e6f73100f1a0d080210401800300050bd0560002000300068007000780080010088010098010042410a1b736572766963655f6c6174656e63795f6176675f7365636f6e647310101a0d080210401800300050bd0560002000300068007000780080010088010098010042410a1b736572766963655f6c6174656e63795f7039395f7365636f6e647310111a0d080210401800300050bd05600020003000680070007800800100880100980100481252c3030a077072696d61727910011801220d616767726567617465645f7473220e66696e6765727072696e745f6964221a7472616e73616374696f6e5f66696e6765727072696e745f69642209706c616e5f6861736822086170705f6e616d652a0c6167675f696e74657276616c2a086d657461646174612a0a737461746973746963732a04706c616e2a15696e6465785f7265636f6d6d656e646174696f6e732a0f657865637574696f6e5f636f756e742a17657865637574696f6e5f746f74616c5f7365636f6e64732a1f657865637574696f6e5f746f74616c5f636c75737465725f7365636f6e64732a1b636f6e74656e74696f6e5f74696d655f6176675f7365636f6e64732a116370755f73716c5f6176675f6e616e6f732a1b736572766963655f6c6174656e63795f6176675f7365636f6e64732a1b736572766963655f6c6174656e63795f7039395f7365636f6e647330013002300330043005400040004000400040004a10080010001a00200028003000380040005a007006700770087009700a700b700c700d700e700f701070117a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005a96010a1266696e6765727072696e745f69645f69647810021800220e66696e6765727072696e745f6964221a7472616e73616374696f6e5f66696e6765727072696e745f696430023003380138043805400040004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a8d010a13657865637574696f6e5f636f756e745f69647810031800220d616767726567617465645f7473220f657865637574696f6e5f636f756e743001300b3802380338043805400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a9f010a1b657865637574696f6e5f746f74616c5f7365636f6e64735f69647810041800220d616767726567617465645f74732217657865637574696f6e5f746f74616c5f7365636f6e64733001300c3802380338043805400040014a10080010001a00200028003000380040005a00680c7a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005aa7010a1f636f6e74656e74696f6e5f74696d655f6176675f7365636f6e64735f69647810051800220d616767726567617465645f7473221b636f6e74656e74696f6e5f74696d655f6176675f7365636f6e64733001300e3802380338043805400040014a10080010001a00200028003000380040005a00680e7a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a93010a156370755f73716c5f6176675f6e616e6f735f69647810061800220d616767726567617465645f747322116370755f73716c5f6176675f6e616e6f733001300f3802380338043805400040014a10080010001a00200028003000380040005a00680f7a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005aa7010a1f736572766963655f6c6174656e63795f6176675f7365636f6e64735f69647810071800220d616767726567617465645f7473221b736572766963655f6c6174656e63795f6176675f7365636f6e6473300130103802380338043805400040014a10080010001a00200028003000380040005a0068107a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005aa7010a1f736572766963655f6c6174656e63795f7039395f7365636f6e64735f69647810081800220d616767726567617465645f7473221b736572766963655f6c6174656e63795f7039395f7365636f6e6473300130113802380338043805400040014a10080010001a00200028003000380040005a0068117a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060096a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100b201f5020a077072696d61727910001a0d616767726567617465645f74731a0e66696e6765727072696e745f69641a1a7472616e73616374696f6e5f66696e6765727072696e745f69641a09706c616e5f686173681a086170705f6e616d651a0c6167675f696e74657276616c1a086d657461646174611a0a737461746973746963731a04706c616e1a15696e6465785f7265636f6d6d656e646174696f6e731a0f657865637574696f6e5f636f756e741a17657865637574696f6e5f746f74616c5f7365636f6e64731a1f657865637574696f6e5f746f74616c5f636c75737465725f7365636f6e64731a1b636f6e74656e74696f6e5f74696d655f6176675f7365636f6e64731a116370755f73716c5f6176675f6e616e6f731a1b736572766963655f6c6174656e63795f6176675f7365636f6e64731a1b736572766963655f6c6174656e63795f7039395f7365636f6e6473200120022003200420052006200720082009200a200b200c200d200e200f201020112800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} ,{"key":"8b89c58a89","value":"030afd140a147472616e73616374696f6e5f6163746976697479183d200128013a0042330a0d616767726567617465645f747310011a0d080910001800300050a00960002000300068007000780080010088010098010042330a0e66696e6765727072696e745f696410021a0c08081000180030005011600020003000680070007800800100880100980100422d0a086170705f6e616d6510031a0c0807100018003000501960002000300068007000780080010088010098010042380a0c6167675f696e74657276616c10041a13080610001800300050a20960006a040800100020003000680070007800800100880100980100422e0a086d6574616461746110051a0d081210001800300050da1d60002000300068007000780080010088010098010042300a0a7374617469737469637310061a0d081210001800300050da1d600020003000680070007800800100880100980100422a0a05717565727910071a0c0807100018003000501960002000300068007000780080010088010098010042340a0f657865637574696f6e5f636f756e7410081a0c08011040180030005014600020003000680070007800800100880100980100423d0a17657865637574696f6e5f746f74616c5f7365636f6e647310091a0d080210401800300050bd0560002000300068007000780080010088010098010042450a1f657865637574696f6e5f746f74616c5f636c75737465725f7365636f6e6473100a1a0d080210401800300050bd0560002000300068007000780080010088010098010042410a1b636f6e74656e74696f6e5f74696d655f6176675f7365636f6e6473100b1a0d080210401800300050bd0560002000300068007000780080010088010098010042370a116370755f73716c5f6176675f6e616e6f73100c1a0d080210401800300050bd0560002000300068007000780080010088010098010042410a1b736572766963655f6c6174656e63795f6176675f7365636f6e6473100d1a0d080210401800300050bd0560002000300068007000780080010088010098010042410a1b736572766963655f6c6174656e63795f7039395f7365636f6e6473100e1a0d080210401800300050bd05600020003000680070007800800100880100980100480f52fc020a077072696d61727910011801220d616767726567617465645f7473220e66696e6765727072696e745f696422086170705f6e616d652a0c6167675f696e74657276616c2a086d657461646174612a0a737461746973746963732a0571756572792a0f657865637574696f6e5f636f756e742a17657865637574696f6e5f746f74616c5f7365636f6e64732a1f657865637574696f6e5f746f74616c5f636c75737465725f7365636f6e64732a1b636f6e74656e74696f6e5f74696d655f6176675f7365636f6e64732a116370755f73716c5f6176675f6e616e6f732a1b736572766963655f6c6174656e63795f6176675f7365636f6e64732a1b736572766963655f6c6174656e63795f7039395f7365636f6e64733001300230034000400040004a10080010001a00200028003000380040005a00700470057006700770087009700a700b700c700d700e7a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005a740a1266696e6765727072696e745f69645f69647810021800220e66696e6765727072696e745f696430023801380340004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a89010a13657865637574696f6e5f636f756e745f69647810031800220d616767726567617465645f7473220f657865637574696f6e5f636f756e743001300838023803400040014a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a9b010a1b657865637574696f6e5f746f74616c5f7365636f6e64735f69647810041800220d616767726567617465645f74732217657865637574696f6e5f746f74616c5f7365636f6e64733001300938023803400040014a10080010001a00200028003000380040005a0068097a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005aa3010a1f636f6e74656e74696f6e5f74696d655f6176675f7365636f6e64735f69647810051800220d616767726567617465645f7473221b636f6e74656e74696f6e5f74696d655f6176675f7365636f6e64733001300b38023803400040014a10080010001a00200028003000380040005a00680b7a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a8f010a156370755f73716c5f6176675f6e616e6f735f69647810061800220d616767726567617465645f747322116370755f73716c5f6176675f6e616e6f733001300c38023803400040014a10080010001a00200028003000380040005a00680c7a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005aa3010a1f736572766963655f6c6174656e63795f6176675f7365636f6e64735f69647810071800220d616767726567617465645f7473221b736572766963655f6c6174656e63795f6176675f7365636f6e64733001300d38023803400040014a10080010001a00200028003000380040005a00680d7a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005aa3010a1f736572766963655f6c6174656e63795f7039395f7365636f6e64735f69647810081800220d616767726567617465645f7473221b736572766963655f6c6174656e63795f7039395f7365636f6e64733001300e38023803400040014a10080010001a00200028003000380040005a00680e7a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060096a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100b201b2020a077072696d61727910001a0d616767726567617465645f74731a0e66696e6765727072696e745f69641a086170705f6e616d651a0c6167675f696e74657276616c1a086d657461646174611a0a737461746973746963731a0571756572791a0f657865637574696f6e5f636f756e741a17657865637574696f6e5f746f74616c5f7365636f6e64731a1f657865637574696f6e5f746f74616c5f636c75737465725f7365636f6e64731a1b636f6e74656e74696f6e5f74696d655f6176675f7365636f6e64731a116370755f73716c5f6176675f6e616e6f731a1b736572766963655f6c6174656e63795f6176675f7365636f6e64731a1b736572766963655f6c6174656e63795f7039395f7365636f6e6473200120022003200420052006200720082009200a200b200c200d200e2800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} +,{"key":"8b89c68a89","value":"030ac0020a0d74656e616e745f69645f736571183e200128013a00422a0a0576616c756510011a0c080110401800300050146000200030006800700078008001008801009801004800525c0a077072696d61727910011800220576616c7565300140004a10080010001a00200028003000380040005a007a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060006a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800100880103980100b201160a077072696d61727910001a0576616c756520012801b80100c20100e2011c0801100118ffffffffffffffff7f2001280032040800100038014200e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880300a80300b00300"} ,{"key":"8c"} ,{"key":"8d"} ,{"key":"8d89888a89","value":"031080808040188080808002220308c0702803500058007801"} @@ -132,6 +133,7 @@ system hash=ee4948433fe6f52eb605592ea5e05129f74c0a66f9151f649531e8d4ad454db3 ,{"key":"a68989a51273746174656d656e745f7374617469737469637300018c89","value":"0154"} ,{"key":"a68989a5127461626c655f7374617469737469637300018c89","value":"0128"} ,{"key":"a68989a5127461736b5f7061796c6f61647300018c89","value":"0174"} +,{"key":"a68989a51274656e616e745f69645f73657100018c89","value":"017c"} ,{"key":"a68989a51274656e616e745f73657474696e677300018c89","value":"0164"} ,{"key":"a68989a51274656e616e745f7461736b7300018c89","value":"0176"} ,{"key":"a68989a51274656e616e745f757361676500018c89","value":"015a"} @@ -173,6 +175,8 @@ system hash=ee4948433fe6f52eb605592ea5e05129f74c0a66f9151f649531e8d4ad454db3 ,{"key":"c3"} ,{"key":"c4"} ,{"key":"c5"} +,{"key":"c6"} +,{"key":"c6898888","value":"0102"} ] tenant hash=f7f9033233d9f3fceb0b94f886a03173d0c81b318c7efc6b5254f56e7011e4fa diff --git a/pkg/sql/catalog/catprivilege/system.go b/pkg/sql/catalog/catprivilege/system.go index d26a6e163b3b..6872711c1150 100644 --- a/pkg/sql/catalog/catprivilege/system.go +++ b/pkg/sql/catalog/catprivilege/system.go @@ -23,6 +23,7 @@ var ( catconstants.NamespaceTableName, catconstants.DescriptorTableName, catconstants.DescIDSequenceTableName, + catconstants.TenantIDSequenceTableName, catconstants.TenantsTableName, catconstants.ProtectedTimestampsMetaTableName, catconstants.ProtectedTimestampsRecordsTableName, diff --git a/pkg/sql/catalog/internal/catkv/testdata/testdata b/pkg/sql/catalog/internal/catkv/testdata/testdata index 1fce099c76da..1f5d85d11e6c 100644 --- a/pkg/sql/catalog/internal/catkv/testdata/testdata +++ b/pkg/sql/catalog/internal/catkv/testdata/testdata @@ -390,6 +390,9 @@ catalog: descriptor: relation namespace: (1, 29, "transaction_activity") zone: gc.ttlseconds=3600 + "062": + descriptor: relation + namespace: (1, 29, "tenant_id_seq") "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 f2f545e30a62..03f96f6cb7d0 100644 --- a/pkg/sql/catalog/systemschema/system.go +++ b/pkg/sql/catalog/systemschema/system.go @@ -99,6 +99,9 @@ CREATE TABLE system.settings ( DescIDSequenceSchema = ` CREATE SEQUENCE system.descriptor_id_seq;` + TenantIDSequenceSchema = ` +CREATE SEQUENCE system.tenant_id_seq;` + // Note: the "active" column is deprecated. TenantsTableSchema = ` CREATE TABLE system.tenants ( @@ -1154,6 +1157,7 @@ func MakeSystemTables() []SystemTable { SettingsTable, DescIDSequence, RoleIDSequence, + TenantIDSequence, TenantsTable, LeaseTable(), EventLogTable, @@ -1430,6 +1434,50 @@ var ( }, ) + // TenantIDSequence is the descriptor for the descriptor ID sequence. + TenantIDSequence = makeSystemTable( + TenantIDSequenceSchema, + systemTable( + catconstants.TenantIDSequenceTableName, + descpb.InvalidID, // dynamically assigned table ID + []descpb.ColumnDescriptor{ + {Name: tabledesc.SequenceColumnName, ID: tabledesc.SequenceColumnID, Type: types.Int}, + }, + []descpb.ColumnFamilyDescriptor{{ + Name: "primary", + ID: keys.SequenceColumnFamilyID, + ColumnNames: []string{tabledesc.SequenceColumnName}, + ColumnIDs: []descpb.ColumnID{tabledesc.SequenceColumnID}, + DefaultColumnID: tabledesc.SequenceColumnID, + }}, + descpb.IndexDescriptor{ + ID: keys.SequenceIndexID, + Name: tabledesc.LegacyPrimaryKeyIndexName, + KeyColumnIDs: []descpb.ColumnID{tabledesc.SequenceColumnID}, + KeyColumnNames: []string{tabledesc.SequenceColumnName}, + KeyColumnDirections: []catenumpb.IndexColumn_Direction{catenumpb.IndexColumn_ASC}, + }, + ), + func(tbl *descpb.TableDescriptor) { + tbl.SequenceOpts = &descpb.TableDescriptor_SequenceOpts{ + Increment: 1, + MinValue: 1, + MaxValue: math.MaxInt64, + Start: 1, + CacheSize: 1, + } + tbl.NextColumnID = 0 + tbl.NextFamilyID = 0 + tbl.NextIndexID = 0 + tbl.NextMutationID = 0 + // Sequences never exposed their internal constraints, + // so all IDs will be left at zero. CREATE SEQUENCE has + // the same behaviour. + tbl.NextConstraintID = 0 + tbl.PrimaryIndex.ConstraintID = 0 + }, + ) + TenantsTable = makeSystemTable( TenantsTableSchema, systemTable( diff --git a/pkg/sql/catalog/systemschema_test/testdata/bootstrap b/pkg/sql/catalog/systemschema_test/testdata/bootstrap index bd22f0eee5a7..28e51953de13 100644 --- a/pkg/sql/catalog/systemschema_test/testdata/bootstrap +++ b/pkg/sql/catalog/systemschema_test/testdata/bootstrap @@ -547,6 +547,7 @@ CREATE TABLE public.transaction_activity ( INDEX service_latency_avg_seconds_idx (aggregated_ts ASC, service_latency_avg_seconds DESC), INDEX service_latency_p99_seconds_idx (aggregated_ts ASC, service_latency_p99_seconds DESC) ); +CREATE SEQUENCE public.tenant_id_seq MINVALUE 1 MAXVALUE 9223372036854775807 INCREMENT 1 START 1; schema_telemetry ---- @@ -593,6 +594,7 @@ schema_telemetry {"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},{"name":"execution_count","id":14,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)::INT8"},{"name":"service_latency","id":15,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"cpu_sql_nanos","id":16,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"contention_time","id":17,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"total_estimated_execution_time","id":18,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8 * (((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8"},{"name":"p99_latency","id":19,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"}],"nextColumnId":20,"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","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time","p99_latency"],"columnIds":[11,1,2,3,4,5,6,7,8,9,10,12,14,15,16,17,18,19]}],"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","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time","p99_latency"],"keyColumnIds":[11,1,2,3,4,5,6],"storeColumnIds":[7,8,9,10,12,14,15,16,17,18,19],"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":{}},{"name":"execution_count_idx","id":4,"version":3,"keyColumnNames":["aggregated_ts","app_name","execution_count"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,14],"keySuffixColumnIds":[11,2,3,4,6],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"service_latency_idx","id":5,"version":3,"keyColumnNames":["aggregated_ts","app_name","service_latency"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,15],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[15],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"cpu_sql_nanos_idx","id":6,"version":3,"keyColumnNames":["aggregated_ts","app_name","cpu_sql_nanos"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,16],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[16],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"contention_time_idx","id":7,"version":3,"keyColumnNames":["aggregated_ts","app_name","contention_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,17],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[17],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"total_estimated_execution_time_idx","id":8,"version":3,"keyColumnNames":["aggregated_ts","app_name","total_estimated_execution_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,18],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[18],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"p99_latency_idx","id":9,"version":3,"keyColumnNames":["aggregated_ts","app_name","p99_latency"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,19],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[19],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"}],"nextIndexId":10,"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}},{"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_id_seq","id":62,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"value","id":1,"type":{"family":"IntFamily","width":64,"oid":20}}],"families":[{"name":"primary","columnNames":["value"],"columnIds":[1],"defaultColumnId":1}],"primaryIndex":{"name":"primary","id":1,"version":4,"keyColumnNames":["value"],"keyColumnDirections":["ASC"],"keyColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{}},"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"formatVersion":3,"sequenceOpts":{"increment":"1","minValue":"1","maxValue":"9223372036854775807","start":"1","sequenceOwner":{},"cacheSize":"1"},"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"}}} {"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}}],"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}} @@ -609,23 +611,23 @@ schema_telemetry schema_telemetry snapshot_id=7cd8a9ae-f35c-4cd2-970a-757174600874 max_records=10 ---- {"database":{"name":"defaultdb","id":100,"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":101}},"defaultPrivileges":{}}} -{"table":{"name":"descriptor_id_seq","id":7,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"value","id":1,"type":{"family":"IntFamily","width":64,"oid":20}}],"families":[{"name":"primary","columnNames":["value"],"columnIds":[1],"defaultColumnId":1}],"primaryIndex":{"name":"primary","id":1,"version":4,"keyColumnNames":["value"],"keyColumnDirections":["ASC"],"keyColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{}},"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"formatVersion":3,"sequenceOpts":{"increment":"1","minValue":"1","maxValue":"9223372036854775807","start":"1","sequenceOwner":{},"cacheSize":"1"},"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"}}} -{"table":{"name":"job_info","id":53,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"job_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"info_key","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"written","id":3,"type":{"family":"TimestampTZFamily","oid":1184},"defaultExpr":"now():::TIMESTAMPTZ"},{"name":"value","id":4,"type":{"family":"BytesFamily","oid":17},"nullable":true}],"nextColumnId":5,"families":[{"name":"primary","columnNames":["job_id","info_key","written","value"],"columnIds":[1,2,3,4],"defaultColumnId":4}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["job_id","info_key","written"],"keyColumnDirections":["ASC","ASC","DESC"],"storeColumnNames":["value"],"keyColumnIds":[1,2,3],"storeColumnIds":[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":"replication_stats","id":27,"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":"report_id","id":3,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"total_ranges","id":4,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"unavailable_ranges","id":5,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"under_replicated_ranges","id":6,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"over_replicated_ranges","id":7,"type":{"family":"IntFamily","width":64,"oid":20}}],"nextColumnId":8,"families":[{"name":"primary","columnNames":["zone_id","subzone_id","report_id","total_ranges","unavailable_ranges","under_replicated_ranges","over_replicated_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"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["report_id","total_ranges","unavailable_ranges","under_replicated_ranges","over_replicated_ranges"],"keyColumnIds":[1,2],"storeColumnIds":[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":"role_members","id":23,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"role","id":1,"type":{"family":"StringFamily","oid":25}},{"name":"member","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"isAdmin","id":3,"type":{"oid":16}},{"name":"role_id","id":4,"type":{"family":"OidFamily","oid":26}},{"name":"member_id","id":5,"type":{"family":"OidFamily","oid":26}}],"nextColumnId":6,"families":[{"name":"primary","columnNames":["role","member"],"columnIds":[1,2]},{"name":"fam_3_isAdmin","id":3,"columnNames":["isAdmin"],"columnIds":[3],"defaultColumnId":3},{"name":"fam_4_role_id","id":4,"columnNames":["role_id"],"columnIds":[4],"defaultColumnId":4},{"name":"fam_5_member_id","id":5,"columnNames":["member_id"],"columnIds":[5],"defaultColumnId":5}],"nextFamilyId":6,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["role","member"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["isAdmin","role_id","member_id"],"keyColumnIds":[1,2],"storeColumnIds":[3,4,5],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":2},"indexes":[{"name":"role_members_role_idx","id":2,"version":3,"keyColumnNames":["role"],"keyColumnDirections":["ASC"],"keyColumnIds":[1],"keySuffixColumnIds":[2],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"role_members_member_idx","id":3,"version":3,"keyColumnNames":["member"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"role_members_role_id_idx","id":4,"version":3,"keyColumnNames":["role_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[4],"keySuffixColumnIds":[1,2],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"role_members_member_id_idx","id":5,"version":3,"keyColumnNames":["member_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[5],"keySuffixColumnIds":[1,2],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"role_members_role_id_member_id_key","id":6,"unique":true,"version":3,"keyColumnNames":["role_id","member_id"],"keyColumnDirections":["ASC","ASC"],"keyColumnIds":[4,5],"keySuffixColumnIds":[1,2],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"constraintId":1}],"nextIndexId":7,"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_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":"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},{"name":"execution_count","id":14,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)::INT8"},{"name":"service_latency","id":15,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"cpu_sql_nanos","id":16,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"contention_time","id":17,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"total_estimated_execution_time","id":18,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8 * (((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8"},{"name":"p99_latency","id":19,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"}],"nextColumnId":20,"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","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time","p99_latency"],"columnIds":[11,1,2,3,4,5,6,7,8,9,10,12,14,15,16,17,18,19]}],"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","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time","p99_latency"],"keyColumnIds":[11,1,2,3,4,5,6],"storeColumnIds":[7,8,9,10,12,14,15,16,17,18,19],"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":{}},{"name":"execution_count_idx","id":4,"version":3,"keyColumnNames":["aggregated_ts","app_name","execution_count"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,14],"keySuffixColumnIds":[11,2,3,4,6],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"service_latency_idx","id":5,"version":3,"keyColumnNames":["aggregated_ts","app_name","service_latency"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,15],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[15],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"cpu_sql_nanos_idx","id":6,"version":3,"keyColumnNames":["aggregated_ts","app_name","cpu_sql_nanos"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,16],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[16],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"contention_time_idx","id":7,"version":3,"keyColumnNames":["aggregated_ts","app_name","contention_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,17],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[17],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"total_estimated_execution_time_idx","id":8,"version":3,"keyColumnNames":["aggregated_ts","app_name","total_estimated_execution_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,18],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[18],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"p99_latency_idx","id":9,"version":3,"keyColumnNames":["aggregated_ts","app_name","p99_latency"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,19],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[19],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"}],"nextIndexId":10,"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":"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":"jobs","id":15,"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":"status","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"created","id":3,"type":{"family":"TimestampFamily","oid":1114},"defaultExpr":"now():::TIMESTAMP"},{"name":"payload","id":4,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"progress","id":5,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"created_by_type","id":6,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"created_by_id","id":7,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"claim_session_id","id":8,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"claim_instance_id","id":9,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"num_runs","id":10,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"last_run","id":11,"type":{"family":"TimestampFamily","oid":1114},"nullable":true},{"name":"job_type","id":12,"type":{"family":"StringFamily","oid":25},"nullable":true}],"nextColumnId":13,"families":[{"name":"fam_0_id_status_created_payload","columnNames":["id","status","created","payload","created_by_type","created_by_id","job_type"],"columnIds":[1,2,3,4,6,7,12]},{"name":"progress","id":1,"columnNames":["progress"],"columnIds":[5],"defaultColumnId":5},{"name":"claim","id":2,"columnNames":["claim_session_id","claim_instance_id","num_runs","last_run"],"columnIds":[8,9,10,11]}],"nextFamilyId":3,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["status","created","payload","progress","created_by_type","created_by_id","claim_session_id","claim_instance_id","num_runs","last_run","job_type"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7,8,9,10,11,12],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"jobs_status_created_idx","id":2,"version":3,"keyColumnNames":["status","created"],"keyColumnDirections":["ASC","ASC"],"keyColumnIds":[2,3],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"jobs_created_by_type_created_by_id_idx","id":3,"version":3,"keyColumnNames":["created_by_type","created_by_id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["status"],"keyColumnIds":[6,7],"keySuffixColumnIds":[1],"storeColumnIds":[2],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"jobs_run_stats_idx","id":4,"version":3,"keyColumnNames":["claim_session_id","status","created"],"keyColumnDirections":["ASC","ASC","ASC"],"storeColumnNames":["last_run","num_runs","claim_instance_id"],"keyColumnIds":[8,2,3],"keySuffixColumnIds":[1],"storeColumnIds":[11,10,9],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"status IN ('_':::STRING, '_':::STRING, '_':::STRING, '_':::STRING, '_':::STRING)"},{"name":"jobs_job_type_idx","id":5,"version":3,"keyColumnNames":["job_type"],"keyColumnDirections":["ASC"],"keyColumnIds":[12],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":6,"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":"protected_ts_meta","id":31,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"singleton","id":1,"type":{"oid":16},"defaultExpr":"true"},{"name":"version","id":2,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"num_records","id":3,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"num_spans","id":4,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"total_bytes","id":5,"type":{"family":"IntFamily","width":64,"oid":20}}],"nextColumnId":6,"families":[{"name":"primary","columnNames":["singleton","version","num_records","num_spans","total_bytes"],"columnIds":[1,2,3,4,5]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["singleton"],"keyColumnDirections":["ASC"],"storeColumnNames":["version","num_records","num_spans","total_bytes"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5],"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,"checks":[{"expr":"singleton","name":"check_singleton","columnIds":[1],"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} +{"table":{"name":"role_options","id":33,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"username","id":1,"type":{"family":"StringFamily","oid":25}},{"name":"option","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"value","id":3,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"user_id","id":4,"type":{"family":"OidFamily","oid":26}}],"nextColumnId":5,"families":[{"name":"primary","columnNames":["username","option","value","user_id"],"columnIds":[1,2,3,4]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["username","option"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["value","user_id"],"keyColumnIds":[1,2],"storeColumnIds":[3,4],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"users_user_id_idx","id":2,"version":3,"keyColumnNames":["user_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[4],"keySuffixColumnIds":[1,2],"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_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":"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_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}}],"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":"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)"},{"name":"execution_count","id":9,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)::INT8"},{"name":"service_latency","id":10,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"cpu_sql_nanos","id":11,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"contention_time","id":12,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"total_estimated_execution_time","id":13,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8 * (((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8"},{"name":"p99_latency","id":14,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"}],"nextColumnId":15,"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","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time","p99_latency"],"columnIds":[8,1,2,3,4,5,6,7,9,10,11,12,13,14]}],"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","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time","p99_latency"],"keyColumnIds":[8,1,2,3,4],"storeColumnIds":[5,6,7,9,10,11,12,13,14],"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":{}},{"name":"execution_count_idx","id":3,"version":3,"keyColumnNames":["aggregated_ts","app_name","execution_count"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,9],"keySuffixColumnIds":[8,2,4],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"service_latency_idx","id":4,"version":3,"keyColumnNames":["aggregated_ts","app_name","service_latency"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,10],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[10],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"cpu_sql_nanos_idx","id":5,"version":3,"keyColumnNames":["aggregated_ts","app_name","cpu_sql_nanos"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,11],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[11],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"contention_time_idx","id":6,"version":3,"keyColumnNames":["aggregated_ts","app_name","contention_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,12],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[12],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"total_estimated_execution_time_idx","id":7,"version":3,"keyColumnNames":["aggregated_ts","app_name","total_estimated_execution_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,13],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[13],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"p99_latency_idx","id":8,"version":3,"keyColumnNames":["aggregated_ts","app_name","p99_latency"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,14],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[14],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"}],"nextIndexId":9,"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":"defaultdb","id":100,"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":101}},"defaultPrivileges":{}}} -{"table":{"name":"descriptor_id_seq","id":7,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"value","id":1,"type":{"family":"IntFamily","width":64,"oid":20}}],"families":[{"name":"primary","columnNames":["value"],"columnIds":[1],"defaultColumnId":1}],"primaryIndex":{"name":"primary","id":1,"version":4,"keyColumnNames":["value"],"keyColumnDirections":["ASC"],"keyColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{}},"privileges":{"users":[{"userProto":"admin","privileges":"32","withGrantOption":"32"},{"userProto":"root","privileges":"32","withGrantOption":"32"}],"ownerProto":"node","version":2},"formatVersion":3,"sequenceOpts":{"increment":"1","minValue":"1","maxValue":"9223372036854775807","start":"1","sequenceOwner":{},"cacheSize":"1"},"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"}}} -{"table":{"name":"job_info","id":53,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"job_id","id":1,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"info_key","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"written","id":3,"type":{"family":"TimestampTZFamily","oid":1184},"defaultExpr":"now():::TIMESTAMPTZ"},{"name":"value","id":4,"type":{"family":"BytesFamily","oid":17},"nullable":true}],"nextColumnId":5,"families":[{"name":"primary","columnNames":["job_id","info_key","written","value"],"columnIds":[1,2,3,4],"defaultColumnId":4}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["job_id","info_key","written"],"keyColumnDirections":["ASC","ASC","DESC"],"storeColumnNames":["value"],"keyColumnIds":[1,2,3],"storeColumnIds":[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":"replication_stats","id":27,"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":"report_id","id":3,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"total_ranges","id":4,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"unavailable_ranges","id":5,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"under_replicated_ranges","id":6,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"over_replicated_ranges","id":7,"type":{"family":"IntFamily","width":64,"oid":20}}],"nextColumnId":8,"families":[{"name":"primary","columnNames":["zone_id","subzone_id","report_id","total_ranges","unavailable_ranges","under_replicated_ranges","over_replicated_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"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["report_id","total_ranges","unavailable_ranges","under_replicated_ranges","over_replicated_ranges"],"keyColumnIds":[1,2],"storeColumnIds":[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":"role_members","id":23,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"role","id":1,"type":{"family":"StringFamily","oid":25}},{"name":"member","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"isAdmin","id":3,"type":{"oid":16}},{"name":"role_id","id":4,"type":{"family":"OidFamily","oid":26}},{"name":"member_id","id":5,"type":{"family":"OidFamily","oid":26}}],"nextColumnId":6,"families":[{"name":"primary","columnNames":["role","member"],"columnIds":[1,2]},{"name":"fam_3_isAdmin","id":3,"columnNames":["isAdmin"],"columnIds":[3],"defaultColumnId":3},{"name":"fam_4_role_id","id":4,"columnNames":["role_id"],"columnIds":[4],"defaultColumnId":4},{"name":"fam_5_member_id","id":5,"columnNames":["member_id"],"columnIds":[5],"defaultColumnId":5}],"nextFamilyId":6,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["role","member"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["isAdmin","role_id","member_id"],"keyColumnIds":[1,2],"storeColumnIds":[3,4,5],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":2},"indexes":[{"name":"role_members_role_idx","id":2,"version":3,"keyColumnNames":["role"],"keyColumnDirections":["ASC"],"keyColumnIds":[1],"keySuffixColumnIds":[2],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"role_members_member_idx","id":3,"version":3,"keyColumnNames":["member"],"keyColumnDirections":["ASC"],"keyColumnIds":[2],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"role_members_role_id_idx","id":4,"version":3,"keyColumnNames":["role_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[4],"keySuffixColumnIds":[1,2],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"role_members_member_id_idx","id":5,"version":3,"keyColumnNames":["member_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[5],"keySuffixColumnIds":[1,2],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"role_members_role_id_member_id_key","id":6,"unique":true,"version":3,"keyColumnNames":["role_id","member_id"],"keyColumnDirections":["ASC","ASC"],"keyColumnIds":[4,5],"keySuffixColumnIds":[1,2],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"constraintId":1}],"nextIndexId":7,"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_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":"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},{"name":"execution_count","id":14,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)::INT8"},{"name":"service_latency","id":15,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"cpu_sql_nanos","id":16,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"contention_time","id":17,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"total_estimated_execution_time","id":18,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8 * (((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8"},{"name":"p99_latency","id":19,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"}],"nextColumnId":20,"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","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time","p99_latency"],"columnIds":[11,1,2,3,4,5,6,7,8,9,10,12,14,15,16,17,18,19]}],"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","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time","p99_latency"],"keyColumnIds":[11,1,2,3,4,5,6],"storeColumnIds":[7,8,9,10,12,14,15,16,17,18,19],"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":{}},{"name":"execution_count_idx","id":4,"version":3,"keyColumnNames":["aggregated_ts","app_name","execution_count"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,14],"keySuffixColumnIds":[11,2,3,4,6],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"service_latency_idx","id":5,"version":3,"keyColumnNames":["aggregated_ts","app_name","service_latency"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,15],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[15],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"cpu_sql_nanos_idx","id":6,"version":3,"keyColumnNames":["aggregated_ts","app_name","cpu_sql_nanos"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,16],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[16],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"contention_time_idx","id":7,"version":3,"keyColumnNames":["aggregated_ts","app_name","contention_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,17],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[17],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"total_estimated_execution_time_idx","id":8,"version":3,"keyColumnNames":["aggregated_ts","app_name","total_estimated_execution_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,18],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[18],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"p99_latency_idx","id":9,"version":3,"keyColumnNames":["aggregated_ts","app_name","p99_latency"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,5,19],"keySuffixColumnIds":[11,2,3,4,6],"compositeColumnIds":[19],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"}],"nextIndexId":10,"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":"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":"jobs","id":15,"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":"status","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"created","id":3,"type":{"family":"TimestampFamily","oid":1114},"defaultExpr":"now():::TIMESTAMP"},{"name":"payload","id":4,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"progress","id":5,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"created_by_type","id":6,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"created_by_id","id":7,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"claim_session_id","id":8,"type":{"family":"BytesFamily","oid":17},"nullable":true},{"name":"claim_instance_id","id":9,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"num_runs","id":10,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true},{"name":"last_run","id":11,"type":{"family":"TimestampFamily","oid":1114},"nullable":true},{"name":"job_type","id":12,"type":{"family":"StringFamily","oid":25},"nullable":true}],"nextColumnId":13,"families":[{"name":"fam_0_id_status_created_payload","columnNames":["id","status","created","payload","created_by_type","created_by_id","job_type"],"columnIds":[1,2,3,4,6,7,12]},{"name":"progress","id":1,"columnNames":["progress"],"columnIds":[5],"defaultColumnId":5},{"name":"claim","id":2,"columnNames":["claim_session_id","claim_instance_id","num_runs","last_run"],"columnIds":[8,9,10,11]}],"nextFamilyId":3,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["id"],"keyColumnDirections":["ASC"],"storeColumnNames":["status","created","payload","progress","created_by_type","created_by_id","claim_session_id","claim_instance_id","num_runs","last_run","job_type"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5,6,7,8,9,10,11,12],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"jobs_status_created_idx","id":2,"version":3,"keyColumnNames":["status","created"],"keyColumnDirections":["ASC","ASC"],"keyColumnIds":[2,3],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"jobs_created_by_type_created_by_id_idx","id":3,"version":3,"keyColumnNames":["created_by_type","created_by_id"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["status"],"keyColumnIds":[6,7],"keySuffixColumnIds":[1],"storeColumnIds":[2],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}},{"name":"jobs_run_stats_idx","id":4,"version":3,"keyColumnNames":["claim_session_id","status","created"],"keyColumnDirections":["ASC","ASC","ASC"],"storeColumnNames":["last_run","num_runs","claim_instance_id"],"keyColumnIds":[8,2,3],"keySuffixColumnIds":[1],"storeColumnIds":[11,10,9],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"status IN ('_':::STRING, '_':::STRING, '_':::STRING, '_':::STRING, '_':::STRING)"},{"name":"jobs_job_type_idx","id":5,"version":3,"keyColumnNames":["job_type"],"keyColumnDirections":["ASC"],"keyColumnIds":[12],"keySuffixColumnIds":[1],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{}}],"nextIndexId":6,"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":"protected_ts_meta","id":31,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"singleton","id":1,"type":{"oid":16},"defaultExpr":"true"},{"name":"version","id":2,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"num_records","id":3,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"num_spans","id":4,"type":{"family":"IntFamily","width":64,"oid":20}},{"name":"total_bytes","id":5,"type":{"family":"IntFamily","width":64,"oid":20}}],"nextColumnId":6,"families":[{"name":"primary","columnNames":["singleton","version","num_records","num_spans","total_bytes"],"columnIds":[1,2,3,4,5]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["singleton"],"keyColumnDirections":["ASC"],"storeColumnNames":["version","num_records","num_spans","total_bytes"],"keyColumnIds":[1],"storeColumnIds":[2,3,4,5],"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,"checks":[{"expr":"singleton","name":"check_singleton","columnIds":[1],"constraintId":2}],"replacementOf":{"time":{}},"createAsOfTime":{"wallTime":"0"},"nextConstraintId":3}} +{"table":{"name":"role_options","id":33,"version":"1","modificationTime":{"wallTime":"0"},"parentId":1,"unexposedParentSchemaId":29,"columns":[{"name":"username","id":1,"type":{"family":"StringFamily","oid":25}},{"name":"option","id":2,"type":{"family":"StringFamily","oid":25}},{"name":"value","id":3,"type":{"family":"StringFamily","oid":25},"nullable":true},{"name":"user_id","id":4,"type":{"family":"OidFamily","oid":26}}],"nextColumnId":5,"families":[{"name":"primary","columnNames":["username","option","value","user_id"],"columnIds":[1,2,3,4]}],"nextFamilyId":1,"primaryIndex":{"name":"primary","id":1,"unique":true,"version":4,"keyColumnNames":["username","option"],"keyColumnDirections":["ASC","ASC"],"storeColumnNames":["value","user_id"],"keyColumnIds":[1,2],"storeColumnIds":[3,4],"foreignKey":{},"interleave":{},"partitioning":{},"encodingType":1,"sharded":{},"geoConfig":{},"constraintId":1},"indexes":[{"name":"users_user_id_idx","id":2,"version":3,"keyColumnNames":["user_id"],"keyColumnDirections":["ASC"],"keyColumnIds":[4],"keySuffixColumnIds":[1,2],"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_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":"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_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}}],"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":"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)"},{"name":"execution_count","id":9,"type":{"family":"IntFamily","width":64,"oid":20},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)::INT8"},{"name":"service_latency","id":10,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"cpu_sql_nanos","id":11,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"contention_time","id":12,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"},{"name":"total_estimated_execution_time","id":13,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"((statistics-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8 * (((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e\u003e'_':::STRING)::FLOAT8"},{"name":"p99_latency","id":14,"type":{"family":"FloatFamily","width":64,"oid":701},"nullable":true,"computeExpr":"(((statistics-\u003e'_':::STRING)-\u003e'_':::STRING)-\u003e'_':::STRING)::FLOAT8"}],"nextColumnId":15,"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","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time","p99_latency"],"columnIds":[8,1,2,3,4,5,6,7,9,10,11,12,13,14]}],"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","execution_count","service_latency","cpu_sql_nanos","contention_time","total_estimated_execution_time","p99_latency"],"keyColumnIds":[8,1,2,3,4],"storeColumnIds":[5,6,7,9,10,11,12,13,14],"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":{}},{"name":"execution_count_idx","id":3,"version":3,"keyColumnNames":["aggregated_ts","app_name","execution_count"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,9],"keySuffixColumnIds":[8,2,4],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"service_latency_idx","id":4,"version":3,"keyColumnNames":["aggregated_ts","app_name","service_latency"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,10],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[10],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"cpu_sql_nanos_idx","id":5,"version":3,"keyColumnNames":["aggregated_ts","app_name","cpu_sql_nanos"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,11],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[11],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"contention_time_idx","id":6,"version":3,"keyColumnNames":["aggregated_ts","app_name","contention_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,12],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[12],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"total_estimated_execution_time_idx","id":7,"version":3,"keyColumnNames":["aggregated_ts","app_name","total_estimated_execution_time"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,13],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[13],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"},{"name":"p99_latency_idx","id":8,"version":3,"keyColumnNames":["aggregated_ts","app_name","p99_latency"],"keyColumnDirections":["ASC","ASC","DESC"],"keyColumnIds":[1,3,14],"keySuffixColumnIds":[8,2,4],"compositeColumnIds":[14],"foreignKey":{},"interleave":{},"partitioning":{},"sharded":{},"geoConfig":{},"predicate":"app_name NOT LIKE '_':::STRING"}],"nextIndexId":9,"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/exec_util.go b/pkg/sql/exec_util.go index 5e3eb45e77bc..8d0ae0bfd440 100644 --- a/pkg/sql/exec_util.go +++ b/pkg/sql/exec_util.go @@ -1640,7 +1640,6 @@ func (*PGWireTestingKnobs) ModuleTestingKnobs() {} // TenantTestingKnobs contains knobs for tenant behavior. type TenantTestingKnobs struct { - // TenantIDCodecOverride overrides the tenant ID used to construct the SQL // server's codec, but nothing else (e.g. its certs). TenantIDCodecOverride roachpb.TenantID @@ -1653,6 +1652,11 @@ type TenantTestingKnobs struct { // the connExecutor checks for the presence of system.descriptor_id_seq after // handling a system tenant descriptor ID generator migration error. BeforeCheckingForDescriptorIDSequence func(ctx context.Context) + + // EnableTenantIDReuse avoids using the tenant ID sequence to ensure + // that automatic tenant ID allocation is always monotonic. This can + // be used in tests that wish to control the tenant ID. + EnableTenantIDReuse bool } var _ base.ModuleTestingKnobs = &TenantTestingKnobs{} diff --git a/pkg/sql/gcjob_test/gc_job_test.go b/pkg/sql/gcjob_test/gc_job_test.go index 3455c79c9e3d..5721e4633855 100644 --- a/pkg/sql/gcjob_test/gc_job_test.go +++ b/pkg/sql/gcjob_test/gc_job_test.go @@ -442,6 +442,7 @@ func TestGCTenant(t *testing.T) { }, execCfg.DefaultZoneConfig, false, /* ifNotExists */ + execCfg.TenantTestingKnobs, ) return err })) @@ -459,6 +460,7 @@ func TestGCTenant(t *testing.T) { }, execCfg.DefaultZoneConfig, false, /* ifNotExists */ + execCfg.TenantTestingKnobs, ) return err })) diff --git a/pkg/sql/logictest/testdata/logic_test/cluster_locks b/pkg/sql/logictest/testdata/logic_test/cluster_locks index d5afb845395b..1f19106f8f54 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 be45d94710b1..873e9c959cac 100644 --- a/pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog +++ b/pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog @@ -155,6 +155,7 @@ SELECT id, strip_volatile(descriptor) FROM crdb_internal.kv_catalog_descriptor 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", "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"}} 60 {"table": {"columns": [{"id": 1, "name": "aggregated_ts", "type": {"family": "TimestampTZFamily", "oid": 1184}}, {"id": 2, "name": "fingerprint_id", "type": {"family": "BytesFamily", "oid": 17}}, {"id": 3, "name": "transaction_fingerprint_id", "type": {"family": "BytesFamily", "oid": 17}}, {"id": 4, "name": "plan_hash", "type": {"family": "BytesFamily", "oid": 17}}, {"id": 5, "name": "app_name", "type": {"family": "StringFamily", "oid": 25}}, {"id": 6, "name": "agg_interval", "type": {"family": "IntervalFamily", "intervalDurationField": {}, "oid": 1186}}, {"id": 7, "name": "metadata", "type": {"family": "JsonFamily", "oid": 3802}}, {"id": 8, "name": "statistics", "type": {"family": "JsonFamily", "oid": 3802}}, {"id": 9, "name": "plan", "type": {"family": "JsonFamily", "oid": 3802}}, {"defaultExpr": "ARRAY[]:::STRING[]", "id": 10, "name": "index_recommendations", "type": {"arrayContents": {"family": "StringFamily", "oid": 25}, "arrayElemType": "StringFamily", "family": "ArrayFamily", "oid": 1009}}, {"id": 11, "name": "execution_count", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 12, "name": "execution_total_seconds", "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"id": 13, "name": "execution_total_cluster_seconds", "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"id": 14, "name": "contention_time_avg_seconds", "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"id": 15, "name": "cpu_sql_avg_nanos", "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"id": 16, "name": "service_latency_avg_seconds", "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"id": 17, "name": "service_latency_p99_seconds", "type": {"family": "FloatFamily", "oid": 701, "width": 64}}], "formatVersion": 3, "id": 60, "indexes": [{"foreignKey": {}, "geoConfig": {}, "id": 2, "interleave": {}, "keyColumnDirections": ["ASC", "ASC"], "keyColumnIds": [2, 3], "keyColumnNames": ["fingerprint_id", "transaction_fingerprint_id"], "keySuffixColumnIds": [1, 4, 5], "name": "fingerprint_id_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"foreignKey": {}, "geoConfig": {}, "id": 3, "interleave": {}, "keyColumnDirections": ["ASC", "DESC"], "keyColumnIds": [1, 11], "keyColumnNames": ["aggregated_ts", "execution_count"], "keySuffixColumnIds": [2, 3, 4, 5], "name": "execution_count_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"compositeColumnIds": [12], "foreignKey": {}, "geoConfig": {}, "id": 4, "interleave": {}, "keyColumnDirections": ["ASC", "DESC"], "keyColumnIds": [1, 12], "keyColumnNames": ["aggregated_ts", "execution_total_seconds"], "keySuffixColumnIds": [2, 3, 4, 5], "name": "execution_total_seconds_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"compositeColumnIds": [14], "foreignKey": {}, "geoConfig": {}, "id": 5, "interleave": {}, "keyColumnDirections": ["ASC", "DESC"], "keyColumnIds": [1, 14], "keyColumnNames": ["aggregated_ts", "contention_time_avg_seconds"], "keySuffixColumnIds": [2, 3, 4, 5], "name": "contention_time_avg_seconds_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"compositeColumnIds": [15], "foreignKey": {}, "geoConfig": {}, "id": 6, "interleave": {}, "keyColumnDirections": ["ASC", "DESC"], "keyColumnIds": [1, 15], "keyColumnNames": ["aggregated_ts", "cpu_sql_avg_nanos"], "keySuffixColumnIds": [2, 3, 4, 5], "name": "cpu_sql_avg_nanos_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"compositeColumnIds": [16], "foreignKey": {}, "geoConfig": {}, "id": 7, "interleave": {}, "keyColumnDirections": ["ASC", "DESC"], "keyColumnIds": [1, 16], "keyColumnNames": ["aggregated_ts", "service_latency_avg_seconds"], "keySuffixColumnIds": [2, 3, 4, 5], "name": "service_latency_avg_seconds_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"compositeColumnIds": [17], "foreignKey": {}, "geoConfig": {}, "id": 8, "interleave": {}, "keyColumnDirections": ["ASC", "DESC"], "keyColumnIds": [1, 17], "keyColumnNames": ["aggregated_ts", "service_latency_p99_seconds"], "keySuffixColumnIds": [2, 3, 4, 5], "name": "service_latency_p99_seconds_idx", "partitioning": {}, "sharded": {}, "version": 3}], "name": "statement_activity", "nextColumnId": 18, "nextConstraintId": 2, "nextIndexId": 9, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "ASC", "ASC", "ASC"], "keyColumnIds": [1, 2, 3, 4, 5], "keyColumnNames": ["aggregated_ts", "fingerprint_id", "transaction_fingerprint_id", "plan_hash", "app_name"], "name": "primary", "partitioning": {}, "sharded": {}, "storeColumnIds": [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], "storeColumnNames": ["agg_interval", "metadata", "statistics", "plan", "index_recommendations", "execution_count", "execution_total_seconds", "execution_total_cluster_seconds", "contention_time_avg_seconds", "cpu_sql_avg_nanos", "service_latency_avg_seconds", "service_latency_p99_seconds"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "32", "userProto": "admin", "withGrantOption": "32"}, {"privileges": "32", "userProto": "root", "withGrantOption": "32"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} 61 {"table": {"columns": [{"id": 1, "name": "aggregated_ts", "type": {"family": "TimestampTZFamily", "oid": 1184}}, {"id": 2, "name": "fingerprint_id", "type": {"family": "BytesFamily", "oid": 17}}, {"id": 3, "name": "app_name", "type": {"family": "StringFamily", "oid": 25}}, {"id": 4, "name": "agg_interval", "type": {"family": "IntervalFamily", "intervalDurationField": {}, "oid": 1186}}, {"id": 5, "name": "metadata", "type": {"family": "JsonFamily", "oid": 3802}}, {"id": 6, "name": "statistics", "type": {"family": "JsonFamily", "oid": 3802}}, {"id": 7, "name": "query", "type": {"family": "StringFamily", "oid": 25}}, {"id": 8, "name": "execution_count", "type": {"family": "IntFamily", "oid": 20, "width": 64}}, {"id": 9, "name": "execution_total_seconds", "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"id": 10, "name": "execution_total_cluster_seconds", "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"id": 11, "name": "contention_time_avg_seconds", "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"id": 12, "name": "cpu_sql_avg_nanos", "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"id": 13, "name": "service_latency_avg_seconds", "type": {"family": "FloatFamily", "oid": 701, "width": 64}}, {"id": 14, "name": "service_latency_p99_seconds", "type": {"family": "FloatFamily", "oid": 701, "width": 64}}], "formatVersion": 3, "id": 61, "indexes": [{"foreignKey": {}, "geoConfig": {}, "id": 2, "interleave": {}, "keyColumnDirections": ["ASC"], "keyColumnIds": [2], "keyColumnNames": ["fingerprint_id"], "keySuffixColumnIds": [1, 3], "name": "fingerprint_id_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"foreignKey": {}, "geoConfig": {}, "id": 3, "interleave": {}, "keyColumnDirections": ["ASC", "DESC"], "keyColumnIds": [1, 8], "keyColumnNames": ["aggregated_ts", "execution_count"], "keySuffixColumnIds": [2, 3], "name": "execution_count_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"compositeColumnIds": [9], "foreignKey": {}, "geoConfig": {}, "id": 4, "interleave": {}, "keyColumnDirections": ["ASC", "DESC"], "keyColumnIds": [1, 9], "keyColumnNames": ["aggregated_ts", "execution_total_seconds"], "keySuffixColumnIds": [2, 3], "name": "execution_total_seconds_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"compositeColumnIds": [11], "foreignKey": {}, "geoConfig": {}, "id": 5, "interleave": {}, "keyColumnDirections": ["ASC", "DESC"], "keyColumnIds": [1, 11], "keyColumnNames": ["aggregated_ts", "contention_time_avg_seconds"], "keySuffixColumnIds": [2, 3], "name": "contention_time_avg_seconds_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"compositeColumnIds": [12], "foreignKey": {}, "geoConfig": {}, "id": 6, "interleave": {}, "keyColumnDirections": ["ASC", "DESC"], "keyColumnIds": [1, 12], "keyColumnNames": ["aggregated_ts", "cpu_sql_avg_nanos"], "keySuffixColumnIds": [2, 3], "name": "cpu_sql_avg_nanos_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"compositeColumnIds": [13], "foreignKey": {}, "geoConfig": {}, "id": 7, "interleave": {}, "keyColumnDirections": ["ASC", "DESC"], "keyColumnIds": [1, 13], "keyColumnNames": ["aggregated_ts", "service_latency_avg_seconds"], "keySuffixColumnIds": [2, 3], "name": "service_latency_avg_seconds_idx", "partitioning": {}, "sharded": {}, "version": 3}, {"compositeColumnIds": [14], "foreignKey": {}, "geoConfig": {}, "id": 8, "interleave": {}, "keyColumnDirections": ["ASC", "DESC"], "keyColumnIds": [1, 14], "keyColumnNames": ["aggregated_ts", "service_latency_p99_seconds"], "keySuffixColumnIds": [2, 3], "name": "service_latency_p99_seconds_idx", "partitioning": {}, "sharded": {}, "version": 3}], "name": "transaction_activity", "nextColumnId": 15, "nextConstraintId": 2, "nextIndexId": 9, "nextMutationId": 1, "parentId": 1, "primaryIndex": {"constraintId": 1, "encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC", "ASC", "ASC"], "keyColumnIds": [1, 2, 3], "keyColumnNames": ["aggregated_ts", "fingerprint_id", "app_name"], "name": "primary", "partitioning": {}, "sharded": {}, "storeColumnIds": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "storeColumnNames": ["agg_interval", "metadata", "statistics", "query", "execution_count", "execution_total_seconds", "execution_total_cluster_seconds", "contention_time_avg_seconds", "cpu_sql_avg_nanos", "service_latency_avg_seconds", "service_latency_p99_seconds"], "unique": true, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "32", "userProto": "admin", "withGrantOption": "32"}, {"privileges": "32", "userProto": "root", "withGrantOption": "32"}], "version": 2}, "replacementOf": {"time": {}}, "unexposedParentSchemaId": 29, "version": "1"}} +62 {"table": {"columns": [{"id": 1, "name": "value", "type": {"family": "IntFamily", "oid": 20, "width": 64}}], "formatVersion": 3, "id": 62, "name": "tenant_id_seq", "parentId": 1, "primaryIndex": {"encodingType": 1, "foreignKey": {}, "geoConfig": {}, "id": 1, "interleave": {}, "keyColumnDirections": ["ASC"], "keyColumnIds": [1], "keyColumnNames": ["value"], "name": "primary", "partitioning": {}, "sharded": {}, "version": 4}, "privileges": {"ownerProto": "node", "users": [{"privileges": "32", "userProto": "admin", "withGrantOption": "32"}, {"privileges": "32", "userProto": "root", "withGrantOption": "32"}], "version": 2}, "replacementOf": {"time": {}}, "sequenceOpts": {"cacheSize": "1", "increment": "1", "maxValue": "9223372036854775807", "minValue": "1", "sequenceOwner": {}, "start": "1"}, "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"}} @@ -528,6 +529,7 @@ SELECT * FROM "".crdb_internal.kv_catalog_namespace 1 29 statement_statistics 42 1 29 table_statistics 20 1 29 task_payloads 58 +1 29 tenant_id_seq 62 1 29 tenant_settings 50 1 29 tenant_tasks 59 1 29 tenant_usage 45 diff --git a/pkg/sql/logictest/testdata/logic_test/dist_vectorize b/pkg/sql/logictest/testdata/logic_test/dist_vectorize index 8da0a57e301a..172c7a25d9b1 100644 --- a/pkg/sql/logictest/testdata/logic_test/dist_vectorize +++ b/pkg/sql/logictest/testdata/logic_test/dist_vectorize @@ -30,7 +30,7 @@ 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/logictest/testdata/logic_test/distsql_agg b/pkg/sql/logictest/testdata/logic_test/distsql_agg index bd55299fee2d..c1223453b472 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_agg +++ b/pkg/sql/logictest/testdata/logic_test/distsql_agg @@ -26,7 +26,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE d 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/logictest/testdata/logic_test/distsql_crdb_internal b/pkg/sql/logictest/testdata/logic_test/distsql_crdb_internal index 341c8c2fda95..2f1c33f12992 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_crdb_internal +++ b/pkg/sql/logictest/testdata/logic_test/distsql_crdb_internal @@ -26,7 +26,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE d 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/logictest/testdata/logic_test/distsql_distinct_on b/pkg/sql/logictest/testdata/logic_test/distsql_distinct_on index 51c7bb0fdca1..8339a1c40f5a 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_distinct_on +++ b/pkg/sql/logictest/testdata/logic_test/distsql_distinct_on @@ -66,7 +66,7 @@ SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE x 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/logictest/testdata/logic_test/distsql_enum b/pkg/sql/logictest/testdata/logic_test/distsql_enum index a08548c40a8f..37dc8ad7f95e 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 e184f550d3d2..da95c5c313d7 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_numtables +++ b/pkg/sql/logictest/testdata/logic_test/distsql_numtables @@ -30,14 +30,14 @@ 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/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/logictest/testdata/logic_test/distsql_stats b/pkg/sql/logictest/testdata/logic_test/distsql_stats index 5737db76796d..e6fa04814171 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 e61301df48e7..5080e432ad74 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_subquery +++ b/pkg/sql/logictest/testdata/logic_test/distsql_subquery @@ -23,7 +23,7 @@ SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE a ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/2 {1} 1 + …/1/2 {1} 1 …/1/2 {2} 2 query T diff --git a/pkg/sql/logictest/testdata/logic_test/distsql_union b/pkg/sql/logictest/testdata/logic_test/distsql_union index 863327e8c449..220a6a78e9ac 100644 --- a/pkg/sql/logictest/testdata/logic_test/distsql_union +++ b/pkg/sql/logictest/testdata/logic_test/distsql_union @@ -32,7 +32,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE x 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/logictest/testdata/logic_test/experimental_distsql_planning_5node b/pkg/sql/logictest/testdata/logic_test/experimental_distsql_planning_5node index c24a4de265d8..40bfa8a2501f 100644 --- a/pkg/sql/logictest/testdata/logic_test/experimental_distsql_planning_5node +++ b/pkg/sql/logictest/testdata/logic_test/experimental_distsql_planning_5node @@ -23,7 +23,7 @@ SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE k 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 e5fbf068f8de..e3395d010e5d 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 ---- -comm%pents -migrations -role_members -role_options -ro😤le_id_s😠eq -statement_diagn -ostics _reques ts -task_payloads -tenant_settings -transaction_statisti/cs -ui +comments +database_role_sett ings +eventlog +jo\\x86bs +join_tokens +priVileges +replication_critical_localities +role_id_seq +statement_bundle_chunks +ten ant_set tings # 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 ---- -"comm%pents" "'sub__i😌d" bigint -"comm%pents" "Typ'e" bigint -"comm%pents" "commen t" text -"comm%pents" "objec\\u6EEFt_id" bigint -"comm%pents" rowid bigint -migrations "Patch" bigint -migrations completed_at timestamp with time zone -migrations internal bigint -migrations major bigint -migrations minor bigint -migrations rowid bigint -role_members " member_id" oid -role_members """ role_ id" oid -role_members "isAdmin%p" boolean -role_members member text -role_members "roLe" text -role_members rowid bigint -role_options "o""ption" text -role_options rowid bigint -role_options user_id oid +comments comment text +comments obj😹ect_id bigint +comments rowid bigint +comments "sub'_id" bigint +comments type bigint +"database_role_sett ings" databasḙ_id oid +"database_role_sett ings" "ro*le_id" oid +"database_role_sett ings" role_name text +"database_role_sett ings" rowid bigint +"database_role_sett ings" "se t"" tings""" ARRAY +eventlog "eventType" text +eventlog info text +eventlog "reportingID" bigint +eventlog rowid bigint +eventlog "targetID" bigint +eventlog "tỉ mestamp" timestamp without time zone +eventlog "uniq""ueID" bytea +"jo\\x86bs" "Claim_session_id" bytea +"jo\\x86bs" claim_instance_id bigint +"jo\\x86bs" "crea ted_by_id" 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 database_role_settings -"d%qbt1" public locations -"d%qbt1" public "sp'an%q_configurations" -"d%qbt2" public de😂scriptor -"d%qbt2" public sq̐lliveness -"d%qbt2" public task_payloads -dbt3 public locations -dbt3 public statement_statistics -dbt3 public table_statistics +"d%qbt1" public external_connections +"d%qbt1" public "le)as e" +"d%qbt1" public statement_activity +"d%qbt2" public tena😿nt_id_seq +"d%qbt2" public ui +"d%qbt2" public w😤eb_sessions +dbt3 public "descrip tor_id_seq" +dbt3 public "span _stats_tenant_boundaries" +dbt3 public "sta""tement_activity" statement ok diff --git a/pkg/sql/logictest/testdata/logic_test/grant_table b/pkg/sql/logictest/testdata/logic_test/grant_table index 6ff62d839548..e17f7cab446a 100644 --- a/pkg/sql/logictest/testdata/logic_test/grant_table +++ b/pkg/sql/logictest/testdata/logic_test/grant_table @@ -1038,6 +1038,8 @@ system public statement_activity admin SELECT system public statement_activity root SELECT true system public transaction_activity admin SELECT true system public transaction_activity root SELECT true +system public tenant_id_seq admin SELECT true +system public tenant_id_seq root SELECT true a pg_extension NULL public USAGE false a public NULL admin ALL true a public NULL public CREATE false @@ -1542,6 +1544,7 @@ system public task_payloads root DELETE system public task_payloads root INSERT true system public task_payloads root SELECT true system public task_payloads root UPDATE true +system public tenant_id_seq root SELECT true system public tenant_settings root DELETE true system public tenant_settings root INSERT true system public tenant_settings root SELECT true diff --git a/pkg/sql/logictest/testdata/logic_test/information_schema b/pkg/sql/logictest/testdata/logic_test/information_schema index 47d4154fc759..b7b2f66f771f 100644 --- a/pkg/sql/logictest/testdata/logic_test/information_schema +++ b/pkg/sql/logictest/testdata/logic_test/information_schema @@ -1756,6 +1756,8 @@ system public 29_58_5_not_null 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_62_1_not_null system public tenant_id_seq CHECK NO NO +system public primary system public tenant_id_seq 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 @@ -2064,6 +2066,7 @@ system public 29_61_6_not_null system public 29_61_7_not_null query IS NOT NULL system public 29_61_8_not_null execution_count IS NOT NULL system public 29_61_9_not_null execution_total_seconds IS NOT NULL +system public 29_62_1_not_null value 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 system public 29_6_3_not_null lastUpdated IS NOT NULL @@ -2175,6 +2178,7 @@ system public statement_statistics transaction_finger 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_id_seq value 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 @@ -2543,6 +2547,7 @@ system public task_payloads owner system public task_payloads owner_id 4 system public task_payloads type 7 system public task_payloads value 8 +system public tenant_id_seq value 1 system public tenant_settings last_updated 4 system public tenant_settings name 2 system public tenant_settings reason 6 @@ -3087,1300 +3092,1304 @@ root other_db public ALL YES query TTTTTTTT colnames,rowsort SELECT * FROM system.information_schema.table_privileges ORDER BY table_schema, table_name, table_schema, grantee, privilege_type ---- -grantor grantee table_catalog table_schema table_name privilege_type is_grantable with_hierarchy -NULL public system crdb_internal active_range_feeds SELECT NO YES -NULL public system crdb_internal backward_dependencies SELECT NO YES -NULL public system crdb_internal builtin_functions SELECT NO YES -NULL public system crdb_internal cluster_contended_indexes SELECT NO YES -NULL public system crdb_internal cluster_contended_keys SELECT NO YES -NULL public system crdb_internal cluster_contended_tables SELECT NO YES -NULL public system crdb_internal cluster_contention_events SELECT NO YES -NULL public system crdb_internal cluster_database_privileges SELECT NO YES -NULL public system crdb_internal cluster_distsql_flows SELECT NO YES -NULL public system crdb_internal cluster_execution_insights SELECT NO YES -NULL public system crdb_internal cluster_inflight_traces SELECT NO YES -NULL public system crdb_internal cluster_locks SELECT NO YES -NULL public system crdb_internal cluster_queries SELECT NO YES -NULL public system crdb_internal cluster_sessions SELECT NO YES -NULL public system crdb_internal cluster_settings SELECT NO YES -NULL public system crdb_internal cluster_statement_statistics SELECT NO YES -NULL public system crdb_internal cluster_transaction_statistics SELECT NO YES -NULL public system crdb_internal cluster_transactions SELECT NO YES -NULL public system crdb_internal cluster_txn_execution_insights SELECT NO YES -NULL public system crdb_internal create_function_statements SELECT NO YES -NULL public system crdb_internal create_schema_statements SELECT NO YES -NULL public system crdb_internal create_statements SELECT NO YES -NULL public system crdb_internal create_type_statements SELECT NO YES -NULL public system crdb_internal cross_db_references SELECT NO YES -NULL public system crdb_internal databases SELECT NO YES -NULL public system crdb_internal default_privileges SELECT NO YES -NULL public system crdb_internal feature_usage SELECT NO YES -NULL public system crdb_internal forward_dependencies SELECT NO YES -NULL public system crdb_internal gossip_alerts SELECT NO YES -NULL public system crdb_internal gossip_liveness SELECT NO YES -NULL public system crdb_internal gossip_network SELECT NO YES -NULL public system crdb_internal gossip_nodes SELECT NO YES -NULL public system crdb_internal index_columns SELECT NO YES -NULL public system crdb_internal index_spans SELECT NO YES -NULL public system crdb_internal index_usage_statistics SELECT NO YES -NULL public system crdb_internal invalid_objects SELECT NO YES -NULL public system crdb_internal jobs SELECT NO YES -NULL public system crdb_internal kv_catalog_comments SELECT NO YES -NULL public system crdb_internal kv_catalog_descriptor SELECT NO YES -NULL public system crdb_internal kv_catalog_namespace SELECT NO YES -NULL public system crdb_internal kv_catalog_zones SELECT NO YES -NULL public system crdb_internal kv_dropped_relations SELECT NO YES -NULL public system crdb_internal kv_node_liveness SELECT NO YES -NULL public system crdb_internal kv_node_status SELECT NO YES -NULL public system crdb_internal kv_store_status SELECT NO YES -NULL public system crdb_internal leases SELECT NO YES -NULL public system crdb_internal lost_descriptors_with_data SELECT NO YES -NULL public system crdb_internal node_build_info SELECT NO YES -NULL public system crdb_internal node_contention_events SELECT NO YES -NULL public system crdb_internal node_distsql_flows SELECT NO YES -NULL public system crdb_internal node_execution_insights SELECT NO YES -NULL public system crdb_internal node_inflight_trace_spans SELECT NO YES -NULL public system crdb_internal node_memory_monitors SELECT NO YES -NULL public system crdb_internal node_metrics SELECT NO YES -NULL public system crdb_internal node_queries SELECT NO YES -NULL public system crdb_internal node_runtime_info SELECT NO YES -NULL public system crdb_internal node_sessions SELECT NO YES -NULL public system crdb_internal node_statement_statistics SELECT NO YES -NULL public system crdb_internal node_tenant_capabilities_cache SELECT NO YES -NULL public system crdb_internal node_transaction_statistics SELECT NO YES -NULL public system crdb_internal node_transactions SELECT NO YES -NULL public system crdb_internal node_txn_execution_insights SELECT NO YES -NULL public system crdb_internal node_txn_stats SELECT NO YES -NULL public system crdb_internal partitions SELECT NO YES -NULL public system crdb_internal pg_catalog_table_is_implemented SELECT NO YES -NULL public system crdb_internal ranges SELECT NO YES -NULL public system crdb_internal ranges_no_leases SELECT NO YES -NULL public system crdb_internal regions SELECT NO YES -NULL public system crdb_internal schema_changes SELECT NO YES -NULL public system crdb_internal session_trace SELECT NO YES -NULL public system crdb_internal session_variables SELECT NO YES -NULL public system crdb_internal statement_statistics SELECT NO YES -NULL public system crdb_internal statement_statistics_persisted SELECT NO YES -NULL public system crdb_internal statement_statistics_persisted_v22_2 SELECT NO YES -NULL public system crdb_internal super_regions SELECT NO YES -NULL public system crdb_internal system_jobs SELECT NO YES -NULL public system crdb_internal table_columns SELECT NO YES -NULL public system crdb_internal table_indexes SELECT NO YES -NULL public system crdb_internal table_row_statistics SELECT NO YES -NULL public system crdb_internal table_spans SELECT NO YES -NULL public system crdb_internal tables SELECT NO YES -NULL public system crdb_internal tenant_usage_details SELECT NO YES -NULL public system crdb_internal transaction_contention_events SELECT NO YES -NULL public system crdb_internal transaction_statistics SELECT NO YES -NULL public system crdb_internal transaction_statistics_persisted SELECT NO YES -NULL public system crdb_internal transaction_statistics_persisted_v22_2 SELECT NO YES -NULL public system crdb_internal zones SELECT NO YES -NULL public system information_schema administrable_role_authorizations SELECT NO YES -NULL public system information_schema applicable_roles SELECT NO YES -NULL public system information_schema attributes SELECT NO YES -NULL public system information_schema character_sets SELECT NO YES -NULL public system information_schema check_constraint_routine_usage SELECT NO YES -NULL public system information_schema check_constraints SELECT NO YES -NULL public system information_schema collation_character_set_applicability SELECT NO YES -NULL public system information_schema collations SELECT NO YES -NULL public system information_schema column_column_usage SELECT NO YES -NULL public system information_schema column_domain_usage SELECT NO YES -NULL public system information_schema column_options SELECT NO YES -NULL public system information_schema column_privileges SELECT NO YES -NULL public system information_schema column_statistics SELECT NO YES -NULL public system information_schema column_udt_usage SELECT NO YES -NULL public system information_schema columns SELECT NO YES -NULL public system information_schema columns_extensions SELECT NO YES -NULL public system information_schema constraint_column_usage SELECT NO YES -NULL public system information_schema constraint_table_usage SELECT NO YES -NULL public system information_schema data_type_privileges SELECT NO YES -NULL public system information_schema domain_constraints SELECT NO YES -NULL public system information_schema domain_udt_usage SELECT NO YES -NULL public system information_schema domains SELECT NO YES -NULL public system information_schema element_types SELECT NO YES -NULL public system information_schema enabled_roles SELECT NO YES -NULL public system information_schema engines SELECT NO YES -NULL public system information_schema events SELECT NO YES -NULL public system information_schema files SELECT NO YES -NULL public system information_schema foreign_data_wrapper_options SELECT NO YES -NULL public system information_schema foreign_data_wrappers SELECT NO YES -NULL public system information_schema foreign_server_options SELECT NO YES -NULL public system information_schema foreign_servers SELECT NO YES -NULL public system information_schema foreign_table_options SELECT NO YES -NULL public system information_schema foreign_tables SELECT NO YES -NULL public system information_schema information_schema_catalog_name SELECT NO YES -NULL public system information_schema key_column_usage SELECT NO YES -NULL public system information_schema keywords SELECT NO YES -NULL public system information_schema optimizer_trace SELECT NO YES -NULL public system information_schema parameters SELECT NO YES -NULL public system information_schema partitions SELECT NO YES -NULL public system information_schema plugins SELECT NO YES -NULL public system information_schema processlist SELECT NO YES -NULL public system information_schema profiling SELECT NO YES -NULL public system information_schema referential_constraints SELECT NO YES -NULL public system information_schema resource_groups SELECT NO YES -NULL public system information_schema role_column_grants SELECT NO YES -NULL public system information_schema role_routine_grants SELECT NO YES -NULL public system information_schema role_table_grants SELECT NO YES -NULL public system information_schema role_udt_grants SELECT NO YES -NULL public system information_schema role_usage_grants SELECT NO YES -NULL public system information_schema routine_privileges SELECT NO YES -NULL public system information_schema routines SELECT NO YES -NULL public system information_schema schema_privileges SELECT NO YES -NULL public system information_schema schemata SELECT NO YES -NULL public system information_schema schemata_extensions SELECT NO YES -NULL public system information_schema sequences SELECT NO YES -NULL public system information_schema session_variables SELECT NO YES -NULL public system information_schema sql_features SELECT NO YES -NULL public system information_schema sql_implementation_info SELECT NO YES -NULL public system information_schema sql_parts SELECT NO YES -NULL public system information_schema sql_sizing SELECT NO YES -NULL public system information_schema st_geometry_columns SELECT NO YES -NULL public system information_schema st_spatial_reference_systems SELECT NO YES -NULL public system information_schema st_units_of_measure SELECT NO YES -NULL public system information_schema statistics SELECT NO YES -NULL public system information_schema table_constraints SELECT NO YES -NULL public system information_schema table_constraints_extensions SELECT NO YES -NULL public system information_schema table_privileges SELECT NO YES -NULL public system information_schema tables SELECT NO YES -NULL public system information_schema tables_extensions SELECT NO YES -NULL public system information_schema tablespaces SELECT NO YES -NULL public system information_schema tablespaces_extensions SELECT NO YES -NULL public system information_schema transforms SELECT NO YES -NULL public system information_schema triggered_update_columns SELECT NO YES -NULL public system information_schema triggers SELECT NO YES -NULL public system information_schema type_privileges SELECT NO YES -NULL public system information_schema udt_privileges SELECT NO YES -NULL public system information_schema usage_privileges SELECT NO YES -NULL public system information_schema user_attributes SELECT NO YES -NULL public system information_schema user_defined_types SELECT NO YES -NULL public system information_schema user_mapping_options SELECT NO YES -NULL public system information_schema user_mappings SELECT NO YES -NULL public system information_schema user_privileges SELECT NO YES -NULL public system information_schema view_column_usage SELECT NO YES -NULL public system information_schema view_routine_usage SELECT NO YES -NULL public system information_schema view_table_usage SELECT NO YES -NULL public system information_schema views SELECT NO YES -NULL public system pg_catalog pg_aggregate SELECT NO YES -NULL public system pg_catalog pg_am SELECT NO YES -NULL public system pg_catalog pg_amop SELECT NO YES -NULL public system pg_catalog pg_amproc SELECT NO YES -NULL public system pg_catalog pg_attrdef SELECT NO YES -NULL public system pg_catalog pg_attribute SELECT NO YES -NULL public system pg_catalog pg_auth_members SELECT NO YES -NULL public system pg_catalog pg_authid SELECT NO YES -NULL public system pg_catalog pg_available_extension_versions SELECT NO YES -NULL public system pg_catalog pg_available_extensions SELECT NO YES -NULL public system pg_catalog pg_cast SELECT NO YES -NULL public system pg_catalog pg_class SELECT NO YES -NULL public system pg_catalog pg_collation SELECT NO YES -NULL public system pg_catalog pg_config SELECT NO YES -NULL public system pg_catalog pg_constraint SELECT NO YES -NULL public system pg_catalog pg_conversion SELECT NO YES -NULL public system pg_catalog pg_cursors SELECT NO YES -NULL public system pg_catalog pg_database SELECT NO YES -NULL public system pg_catalog pg_db_role_setting SELECT NO YES -NULL public system pg_catalog pg_default_acl SELECT NO YES -NULL public system pg_catalog pg_depend SELECT NO YES -NULL public system pg_catalog pg_description SELECT NO YES -NULL public system pg_catalog pg_enum SELECT NO YES -NULL public system pg_catalog pg_event_trigger SELECT NO YES -NULL public system pg_catalog pg_extension SELECT NO YES -NULL public system pg_catalog pg_file_settings SELECT NO YES -NULL public system pg_catalog pg_foreign_data_wrapper SELECT NO YES -NULL public system pg_catalog pg_foreign_server SELECT NO YES -NULL public system pg_catalog pg_foreign_table SELECT NO YES -NULL public system pg_catalog pg_group SELECT NO YES -NULL public system pg_catalog pg_hba_file_rules SELECT NO YES -NULL public system pg_catalog pg_index SELECT NO YES -NULL public system pg_catalog pg_indexes SELECT NO YES -NULL public system pg_catalog pg_inherits SELECT NO YES -NULL public system pg_catalog pg_init_privs SELECT NO YES -NULL public system pg_catalog pg_language SELECT NO YES -NULL public system pg_catalog pg_largeobject SELECT NO YES -NULL public system pg_catalog pg_largeobject_metadata SELECT NO YES -NULL public system pg_catalog pg_locks SELECT NO YES -NULL public system pg_catalog pg_matviews SELECT NO YES -NULL public system pg_catalog pg_namespace SELECT NO YES -NULL public system pg_catalog pg_opclass SELECT NO YES -NULL public system pg_catalog pg_operator SELECT NO YES -NULL public system pg_catalog pg_opfamily SELECT NO YES -NULL public system pg_catalog pg_partitioned_table SELECT NO YES -NULL public system pg_catalog pg_policies SELECT NO YES -NULL public system pg_catalog pg_policy SELECT NO YES -NULL public system pg_catalog pg_prepared_statements SELECT NO YES -NULL public system pg_catalog pg_prepared_xacts SELECT NO YES -NULL public system pg_catalog pg_proc SELECT NO YES -NULL public system pg_catalog pg_publication SELECT NO YES -NULL public system pg_catalog pg_publication_rel SELECT NO YES -NULL public system pg_catalog pg_publication_tables SELECT NO YES -NULL public system pg_catalog pg_range SELECT NO YES -NULL public system pg_catalog pg_replication_origin SELECT NO YES -NULL public system pg_catalog pg_replication_origin_status SELECT NO YES -NULL public system pg_catalog pg_replication_slots SELECT NO YES -NULL public system pg_catalog pg_rewrite SELECT NO YES -NULL public system pg_catalog pg_roles SELECT NO YES -NULL public system pg_catalog pg_rules SELECT NO YES -NULL public system pg_catalog pg_seclabel SELECT NO YES -NULL public system pg_catalog pg_seclabels SELECT NO YES -NULL public system pg_catalog pg_sequence SELECT NO YES -NULL public system pg_catalog pg_sequences SELECT NO YES -NULL public system pg_catalog pg_settings SELECT NO YES -NULL public system pg_catalog pg_shadow SELECT NO YES -NULL public system pg_catalog pg_shdepend SELECT NO YES -NULL public system pg_catalog pg_shdescription SELECT NO YES -NULL public system pg_catalog pg_shmem_allocations SELECT NO YES -NULL public system pg_catalog pg_shseclabel SELECT NO YES -NULL public system pg_catalog pg_stat_activity SELECT NO YES -NULL public system pg_catalog pg_stat_all_indexes SELECT NO YES -NULL public system pg_catalog pg_stat_all_tables SELECT NO YES -NULL public system pg_catalog pg_stat_archiver SELECT NO YES -NULL public system pg_catalog pg_stat_bgwriter SELECT NO YES -NULL public system pg_catalog pg_stat_database SELECT NO YES -NULL public system pg_catalog pg_stat_database_conflicts SELECT NO YES -NULL public system pg_catalog pg_stat_gssapi SELECT NO YES -NULL public system pg_catalog pg_stat_progress_analyze SELECT NO YES -NULL public system pg_catalog pg_stat_progress_basebackup SELECT NO YES -NULL public system pg_catalog pg_stat_progress_cluster SELECT NO YES -NULL public system pg_catalog pg_stat_progress_create_index SELECT NO YES -NULL public system pg_catalog pg_stat_progress_vacuum SELECT NO YES -NULL public system pg_catalog pg_stat_replication SELECT NO YES -NULL public system pg_catalog pg_stat_slru SELECT NO YES -NULL public system pg_catalog pg_stat_ssl SELECT NO YES -NULL public system pg_catalog pg_stat_subscription SELECT NO YES -NULL public system pg_catalog pg_stat_sys_indexes SELECT NO YES -NULL public system pg_catalog pg_stat_sys_tables SELECT NO YES -NULL public system pg_catalog pg_stat_user_functions SELECT NO YES -NULL public system pg_catalog pg_stat_user_indexes SELECT NO YES -NULL public system pg_catalog pg_stat_user_tables SELECT NO YES -NULL public system pg_catalog pg_stat_wal_receiver SELECT NO YES -NULL public system pg_catalog pg_stat_xact_all_tables SELECT NO YES -NULL public system pg_catalog pg_stat_xact_sys_tables SELECT NO YES -NULL public system pg_catalog pg_stat_xact_user_functions SELECT NO YES -NULL public system pg_catalog pg_stat_xact_user_tables SELECT NO YES -NULL public system pg_catalog pg_statio_all_indexes SELECT NO YES -NULL public system pg_catalog pg_statio_all_sequences SELECT NO YES -NULL public system pg_catalog pg_statio_all_tables SELECT NO YES -NULL public system pg_catalog pg_statio_sys_indexes SELECT NO YES -NULL public system pg_catalog pg_statio_sys_sequences SELECT NO YES -NULL public system pg_catalog pg_statio_sys_tables SELECT NO YES -NULL public system pg_catalog pg_statio_user_indexes SELECT NO YES -NULL public system pg_catalog pg_statio_user_sequences SELECT NO YES -NULL public system pg_catalog pg_statio_user_tables SELECT NO YES -NULL public system pg_catalog pg_statistic SELECT NO YES -NULL public system pg_catalog pg_statistic_ext SELECT NO YES -NULL public system pg_catalog pg_statistic_ext_data SELECT NO YES -NULL public system pg_catalog pg_stats SELECT NO YES -NULL public system pg_catalog pg_stats_ext SELECT NO YES -NULL public system pg_catalog pg_subscription SELECT NO YES -NULL public system pg_catalog pg_subscription_rel SELECT NO YES -NULL public system pg_catalog pg_tables SELECT NO YES -NULL public system pg_catalog pg_tablespace SELECT NO YES -NULL public system pg_catalog pg_timezone_abbrevs SELECT NO YES -NULL public system pg_catalog pg_timezone_names SELECT NO YES -NULL public system pg_catalog pg_transform SELECT NO YES -NULL public system pg_catalog pg_trigger SELECT NO YES -NULL public system pg_catalog pg_ts_config SELECT NO YES -NULL public system pg_catalog pg_ts_config_map SELECT NO YES -NULL public system pg_catalog pg_ts_dict SELECT NO YES -NULL public system pg_catalog pg_ts_parser SELECT NO YES -NULL public system pg_catalog pg_ts_template SELECT NO YES -NULL public system pg_catalog pg_type SELECT NO YES -NULL public system pg_catalog pg_user SELECT NO YES -NULL public system pg_catalog pg_user_mapping SELECT NO YES -NULL public system pg_catalog pg_user_mappings SELECT NO YES -NULL public system pg_catalog pg_views SELECT NO YES -NULL public system pg_extension geography_columns SELECT NO YES -NULL public system pg_extension geometry_columns SELECT NO YES -NULL public system pg_extension spatial_ref_sys SELECT NO YES -NULL admin system public comments DELETE YES NO -NULL admin system public comments INSERT YES NO -NULL admin system public comments SELECT YES YES -NULL admin system public comments UPDATE YES NO -NULL public system public comments SELECT NO YES -NULL root system public comments DELETE YES NO -NULL root system public comments INSERT YES NO -NULL root system public comments SELECT YES YES -NULL root system public comments UPDATE YES NO -NULL admin system public database_role_settings DELETE YES NO -NULL admin system public database_role_settings INSERT YES NO -NULL admin system public database_role_settings SELECT YES YES -NULL admin system public database_role_settings UPDATE YES NO -NULL root system public database_role_settings DELETE YES NO -NULL root system public database_role_settings INSERT YES NO -NULL root system public database_role_settings SELECT YES YES -NULL root system public database_role_settings UPDATE YES NO -NULL admin system public descriptor SELECT YES YES -NULL root system public descriptor SELECT YES YES -NULL admin system public descriptor_id_seq SELECT YES YES -NULL root system public descriptor_id_seq SELECT YES YES -NULL admin system public eventlog DELETE YES NO -NULL admin system public eventlog INSERT YES NO -NULL admin system public eventlog SELECT YES YES -NULL admin system public eventlog UPDATE YES NO -NULL root system public eventlog DELETE YES NO -NULL root system public eventlog INSERT YES NO -NULL root system public eventlog SELECT YES YES -NULL root system public eventlog UPDATE YES NO -NULL admin system public external_connections DELETE YES NO -NULL admin system public external_connections INSERT YES NO -NULL admin system public external_connections SELECT YES YES -NULL admin system public external_connections UPDATE YES NO -NULL root system public external_connections DELETE YES NO -NULL root system public external_connections INSERT YES NO -NULL root system public external_connections SELECT YES YES -NULL root system public external_connections UPDATE YES NO -NULL admin system public job_info DELETE YES NO -NULL admin system public job_info INSERT YES NO -NULL admin system public job_info SELECT YES YES -NULL admin system public job_info UPDATE YES NO -NULL root system public job_info DELETE YES NO -NULL root system public job_info INSERT YES NO -NULL root system public job_info SELECT YES YES -NULL root system public job_info UPDATE YES NO -NULL admin system public jobs DELETE YES NO -NULL admin system public jobs INSERT YES NO -NULL admin system public jobs SELECT YES YES -NULL admin system public jobs UPDATE YES NO -NULL root system public jobs DELETE YES NO -NULL root system public jobs INSERT YES NO -NULL root system public jobs SELECT YES YES -NULL root system public jobs UPDATE YES NO -NULL admin system public join_tokens DELETE YES NO -NULL admin system public join_tokens INSERT YES NO -NULL admin system public join_tokens SELECT YES YES -NULL admin system public join_tokens UPDATE YES NO -NULL root system public join_tokens DELETE YES NO -NULL root system public join_tokens INSERT YES NO -NULL root system public join_tokens SELECT YES YES -NULL root system public join_tokens UPDATE YES NO -NULL admin system public lease DELETE YES NO -NULL admin system public lease INSERT YES NO -NULL admin system public lease SELECT YES YES -NULL admin system public lease UPDATE YES NO -NULL root system public lease DELETE YES NO -NULL root system public lease INSERT YES NO -NULL root system public lease SELECT YES YES -NULL root system public lease UPDATE YES NO -NULL admin system public locations DELETE YES NO -NULL admin system public locations INSERT YES NO -NULL admin system public locations SELECT YES YES -NULL admin system public locations UPDATE YES NO -NULL root system public locations DELETE YES NO -NULL root system public locations INSERT YES NO -NULL root system public locations SELECT YES YES -NULL root system public locations UPDATE YES NO -NULL admin system public migrations DELETE YES NO -NULL admin system public migrations INSERT YES NO -NULL admin system public migrations SELECT YES YES -NULL admin system public migrations UPDATE YES NO -NULL root system public migrations DELETE YES NO -NULL root system public migrations INSERT YES NO -NULL root system public migrations SELECT YES YES -NULL root system public migrations UPDATE YES NO -NULL admin system public namespace SELECT YES YES -NULL root system public namespace SELECT YES YES -NULL admin system public privileges DELETE YES NO -NULL admin system public privileges INSERT YES NO -NULL admin system public privileges SELECT YES YES -NULL admin system public privileges UPDATE YES NO -NULL root system public privileges DELETE YES NO -NULL root system public privileges INSERT YES NO -NULL root system public privileges SELECT YES YES -NULL root system public privileges UPDATE YES NO -NULL admin system public protected_ts_meta SELECT YES YES -NULL root system public protected_ts_meta SELECT YES YES -NULL admin system public protected_ts_records SELECT YES YES -NULL root system public protected_ts_records SELECT YES YES -NULL admin system public rangelog DELETE YES NO -NULL admin system public rangelog INSERT YES NO -NULL admin system public rangelog SELECT YES YES -NULL admin system public rangelog UPDATE YES NO -NULL root system public rangelog DELETE YES NO -NULL root system public rangelog INSERT YES NO -NULL root system public rangelog SELECT YES YES -NULL root system public rangelog UPDATE YES NO -NULL admin system public replication_constraint_stats DELETE YES NO -NULL admin system public replication_constraint_stats INSERT YES NO -NULL admin system public replication_constraint_stats SELECT YES YES -NULL admin system public replication_constraint_stats UPDATE YES NO -NULL root system public replication_constraint_stats DELETE YES NO -NULL root system public replication_constraint_stats INSERT YES NO -NULL root system public replication_constraint_stats SELECT YES YES -NULL root system public replication_constraint_stats UPDATE YES NO -NULL admin system public replication_critical_localities DELETE YES NO -NULL admin system public replication_critical_localities INSERT YES NO -NULL admin system public replication_critical_localities SELECT YES YES -NULL admin system public replication_critical_localities UPDATE YES NO -NULL root system public replication_critical_localities DELETE YES NO -NULL root system public replication_critical_localities INSERT YES NO -NULL root system public replication_critical_localities SELECT YES YES -NULL root system public replication_critical_localities UPDATE YES NO -NULL admin system public replication_stats DELETE YES NO -NULL admin system public replication_stats INSERT YES NO -NULL admin system public replication_stats SELECT YES YES -NULL admin system public replication_stats UPDATE YES NO -NULL root system public replication_stats DELETE YES NO -NULL root system public replication_stats INSERT YES NO -NULL root system public replication_stats SELECT YES YES -NULL root system public replication_stats UPDATE YES NO -NULL admin system public reports_meta DELETE YES NO -NULL admin system public reports_meta INSERT YES NO -NULL admin system public reports_meta SELECT YES YES -NULL admin system public reports_meta UPDATE YES NO -NULL root system public reports_meta DELETE YES NO -NULL root system public reports_meta INSERT YES NO -NULL root system public reports_meta SELECT YES YES -NULL root system public reports_meta UPDATE YES NO -NULL admin system public role_id_seq SELECT YES YES -NULL admin system public role_id_seq UPDATE YES NO -NULL admin system public role_id_seq USAGE YES NO -NULL root system public role_id_seq SELECT YES YES -NULL root system public role_id_seq UPDATE YES NO -NULL root system public role_id_seq USAGE YES NO -NULL admin system public role_members DELETE YES NO -NULL admin system public role_members INSERT YES NO -NULL admin system public role_members SELECT YES YES -NULL admin system public role_members UPDATE YES NO -NULL root system public role_members DELETE YES NO -NULL root system public role_members INSERT YES NO -NULL root system public role_members SELECT YES YES -NULL root system public role_members UPDATE YES NO -NULL admin system public role_options DELETE YES NO -NULL admin system public role_options INSERT YES NO -NULL admin system public role_options SELECT YES YES -NULL admin system public role_options UPDATE YES NO -NULL root system public role_options DELETE YES NO -NULL root system public role_options INSERT YES NO -NULL root system public role_options SELECT YES YES -NULL root system public role_options UPDATE YES NO -NULL admin system public scheduled_jobs DELETE YES NO -NULL admin system public scheduled_jobs INSERT YES NO -NULL admin system public scheduled_jobs SELECT YES YES -NULL admin system public scheduled_jobs UPDATE YES NO -NULL root system public scheduled_jobs DELETE YES NO -NULL root system public scheduled_jobs INSERT YES NO -NULL root system public scheduled_jobs SELECT YES YES -NULL root system public scheduled_jobs UPDATE YES NO -NULL admin system public settings DELETE YES NO -NULL admin system public settings INSERT YES NO -NULL admin system public settings SELECT YES YES -NULL admin system public settings UPDATE YES NO -NULL root system public settings DELETE YES NO -NULL root system public settings INSERT YES NO -NULL root system public settings SELECT YES YES -NULL root system public settings UPDATE YES NO -NULL admin system public span_configurations DELETE YES NO -NULL admin system public span_configurations INSERT YES NO -NULL admin system public span_configurations SELECT YES YES -NULL admin system public span_configurations UPDATE YES NO -NULL root system public span_configurations DELETE YES NO -NULL root system public span_configurations INSERT YES NO -NULL root system public span_configurations SELECT YES YES -NULL root system public span_configurations UPDATE YES NO -NULL admin system public span_stats_buckets DELETE YES NO -NULL admin system public span_stats_buckets INSERT YES NO -NULL admin system public span_stats_buckets SELECT YES YES -NULL admin system public span_stats_buckets UPDATE YES NO -NULL root system public span_stats_buckets DELETE YES NO -NULL root system public span_stats_buckets INSERT YES NO -NULL root system public span_stats_buckets SELECT YES YES -NULL root system public span_stats_buckets UPDATE YES NO -NULL admin system public span_stats_samples DELETE YES NO -NULL admin system public span_stats_samples INSERT YES NO -NULL admin system public span_stats_samples SELECT YES YES -NULL admin system public span_stats_samples UPDATE YES NO -NULL root system public span_stats_samples DELETE YES NO -NULL root system public span_stats_samples INSERT YES NO -NULL root system public span_stats_samples SELECT YES YES -NULL root system public span_stats_samples UPDATE YES NO -NULL admin system public span_stats_tenant_boundaries DELETE YES NO -NULL admin system public span_stats_tenant_boundaries INSERT YES NO -NULL admin system public span_stats_tenant_boundaries SELECT YES YES -NULL admin system public span_stats_tenant_boundaries UPDATE YES NO -NULL root system public span_stats_tenant_boundaries DELETE YES NO -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 span_stats_unique_keys DELETE YES NO -NULL admin system public span_stats_unique_keys INSERT YES NO -NULL admin system public span_stats_unique_keys SELECT YES YES -NULL admin system public span_stats_unique_keys UPDATE YES NO -NULL root system public span_stats_unique_keys DELETE YES NO -NULL root system public span_stats_unique_keys INSERT YES NO -NULL root system public span_stats_unique_keys SELECT YES YES -NULL root system public span_stats_unique_keys UPDATE YES NO -NULL admin system public sql_instances DELETE YES NO -NULL admin system public sql_instances INSERT YES NO -NULL admin system public sql_instances SELECT YES YES -NULL admin system public sql_instances UPDATE YES NO -NULL root system public sql_instances DELETE YES NO -NULL root system public sql_instances INSERT YES NO -NULL root system public sql_instances SELECT YES YES -NULL root system public sql_instances UPDATE YES NO -NULL admin system public sqlliveness DELETE YES NO -NULL admin system public sqlliveness INSERT YES NO -NULL admin system public sqlliveness SELECT YES YES -NULL admin system public sqlliveness UPDATE YES NO -NULL root system public sqlliveness DELETE YES NO -NULL root system public sqlliveness INSERT YES NO -NULL root system public sqlliveness SELECT YES YES -NULL root system public sqlliveness UPDATE YES NO -NULL admin system public statement_activity SELECT YES YES -NULL root system public statement_activity SELECT YES YES -NULL admin system public statement_bundle_chunks DELETE YES NO -NULL admin system public statement_bundle_chunks INSERT YES NO -NULL admin system public statement_bundle_chunks SELECT YES YES -NULL admin system public statement_bundle_chunks UPDATE YES NO -NULL root system public statement_bundle_chunks DELETE YES NO -NULL root system public statement_bundle_chunks INSERT YES NO -NULL root system public statement_bundle_chunks SELECT YES YES -NULL root system public statement_bundle_chunks UPDATE YES NO -NULL admin system public statement_diagnostics DELETE YES NO -NULL admin system public statement_diagnostics INSERT YES NO -NULL admin system public statement_diagnostics SELECT YES YES -NULL admin system public statement_diagnostics UPDATE YES NO -NULL root system public statement_diagnostics DELETE YES NO -NULL root system public statement_diagnostics INSERT YES NO -NULL root system public statement_diagnostics SELECT YES YES -NULL root system public statement_diagnostics UPDATE YES NO -NULL admin system public statement_diagnostics_requests DELETE YES NO -NULL admin system public statement_diagnostics_requests INSERT YES NO -NULL admin system public statement_diagnostics_requests SELECT YES YES -NULL admin system public statement_diagnostics_requests UPDATE YES NO -NULL root system public statement_diagnostics_requests DELETE YES NO -NULL root system public statement_diagnostics_requests INSERT YES NO -NULL root system public statement_diagnostics_requests SELECT YES YES -NULL root system public statement_diagnostics_requests UPDATE YES NO -NULL admin system public statement_statistics SELECT YES YES -NULL root system public statement_statistics SELECT YES YES -NULL admin system public table_statistics DELETE YES NO -NULL admin system public table_statistics INSERT YES NO -NULL admin system public table_statistics SELECT YES YES -NULL admin system public table_statistics UPDATE YES NO -NULL root system public table_statistics DELETE YES NO -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 -NULL admin system public tenant_settings UPDATE YES NO -NULL root system public tenant_settings DELETE YES NO -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 -NULL admin system public tenant_usage UPDATE YES NO -NULL root system public tenant_usage DELETE YES NO -NULL root system public tenant_usage INSERT YES NO -NULL root system public tenant_usage SELECT YES YES -NULL root system public tenant_usage UPDATE YES NO -NULL admin system public tenants SELECT YES YES -NULL root system public tenants SELECT YES YES -NULL admin system public transaction_activity SELECT YES YES -NULL root system public transaction_activity SELECT YES YES -NULL admin system public transaction_statistics SELECT YES YES -NULL root system public transaction_statistics SELECT YES YES -NULL admin system public ui DELETE YES NO -NULL admin system public ui INSERT YES NO -NULL admin system public ui SELECT YES YES -NULL admin system public ui UPDATE YES NO -NULL root system public ui DELETE YES NO -NULL root system public ui INSERT YES NO -NULL root system public ui SELECT YES YES -NULL root system public ui UPDATE YES NO -NULL admin system public users DELETE YES NO -NULL admin system public users INSERT YES NO -NULL admin system public users SELECT YES YES -NULL admin system public users UPDATE YES NO -NULL root system public users DELETE YES NO -NULL root system public users INSERT YES NO -NULL root system public users SELECT YES YES -NULL root system public users UPDATE YES NO -NULL admin system public web_sessions DELETE YES NO -NULL admin system public web_sessions INSERT YES NO -NULL admin system public web_sessions SELECT YES YES -NULL admin system public web_sessions UPDATE YES NO -NULL root system public web_sessions DELETE YES NO -NULL root system public web_sessions INSERT YES NO -NULL root system public web_sessions SELECT YES YES -NULL root system public web_sessions UPDATE YES NO -NULL admin system public zones DELETE YES NO -NULL admin system public zones INSERT YES NO -NULL admin system public zones SELECT YES YES -NULL admin system public zones UPDATE YES NO -NULL root system public zones DELETE YES NO -NULL root system public zones INSERT YES NO -NULL root system public zones SELECT YES YES -NULL root system public zones UPDATE YES NO +grantor grantee table_catalog table_schema table_name privilege_type is_grantable with_hierarchy +NULL public system crdb_internal active_range_feeds SELECT NO YES +NULL public system crdb_internal backward_dependencies SELECT NO YES +NULL public system crdb_internal builtin_functions SELECT NO YES +NULL public system crdb_internal cluster_contended_indexes SELECT NO YES +NULL public system crdb_internal cluster_contended_keys SELECT NO YES +NULL public system crdb_internal cluster_contended_tables SELECT NO YES +NULL public system crdb_internal cluster_contention_events SELECT NO YES +NULL public system crdb_internal cluster_database_privileges SELECT NO YES +NULL public system crdb_internal cluster_distsql_flows SELECT NO YES +NULL public system crdb_internal cluster_execution_insights SELECT NO YES +NULL public system crdb_internal cluster_inflight_traces SELECT NO YES +NULL public system crdb_internal cluster_locks SELECT NO YES +NULL public system crdb_internal cluster_queries SELECT NO YES +NULL public system crdb_internal cluster_sessions SELECT NO YES +NULL public system crdb_internal cluster_settings SELECT NO YES +NULL public system crdb_internal cluster_statement_statistics SELECT NO YES +NULL public system crdb_internal cluster_transaction_statistics SELECT NO YES +NULL public system crdb_internal cluster_transactions SELECT NO YES +NULL public system crdb_internal cluster_txn_execution_insights SELECT NO YES +NULL public system crdb_internal create_function_statements SELECT NO YES +NULL public system crdb_internal create_schema_statements SELECT NO YES +NULL public system crdb_internal create_statements SELECT NO YES +NULL public system crdb_internal create_type_statements SELECT NO YES +NULL public system crdb_internal cross_db_references SELECT NO YES +NULL public system crdb_internal databases SELECT NO YES +NULL public system crdb_internal default_privileges SELECT NO YES +NULL public system crdb_internal feature_usage SELECT NO YES +NULL public system crdb_internal forward_dependencies SELECT NO YES +NULL public system crdb_internal gossip_alerts SELECT NO YES +NULL public system crdb_internal gossip_liveness SELECT NO YES +NULL public system crdb_internal gossip_network SELECT NO YES +NULL public system crdb_internal gossip_nodes SELECT NO YES +NULL public system crdb_internal index_columns SELECT NO YES +NULL public system crdb_internal index_spans SELECT NO YES +NULL public system crdb_internal index_usage_statistics SELECT NO YES +NULL public system crdb_internal invalid_objects SELECT NO YES +NULL public system crdb_internal jobs SELECT NO YES +NULL public system crdb_internal kv_catalog_comments SELECT NO YES +NULL public system crdb_internal kv_catalog_descriptor SELECT NO YES +NULL public system crdb_internal kv_catalog_namespace SELECT NO YES +NULL public system crdb_internal kv_catalog_zones SELECT NO YES +NULL public system crdb_internal kv_dropped_relations SELECT NO YES +NULL public system crdb_internal kv_node_liveness SELECT NO YES +NULL public system crdb_internal kv_node_status SELECT NO YES +NULL public system crdb_internal kv_store_status SELECT NO YES +NULL public system crdb_internal leases SELECT NO YES +NULL public system crdb_internal lost_descriptors_with_data SELECT NO YES +NULL public system crdb_internal node_build_info SELECT NO YES +NULL public system crdb_internal node_contention_events SELECT NO YES +NULL public system crdb_internal node_distsql_flows SELECT NO YES +NULL public system crdb_internal node_execution_insights SELECT NO YES +NULL public system crdb_internal node_inflight_trace_spans SELECT NO YES +NULL public system crdb_internal node_memory_monitors SELECT NO YES +NULL public system crdb_internal node_metrics SELECT NO YES +NULL public system crdb_internal node_queries SELECT NO YES +NULL public system crdb_internal node_runtime_info SELECT NO YES +NULL public system crdb_internal node_sessions SELECT NO YES +NULL public system crdb_internal node_statement_statistics SELECT NO YES +NULL public system crdb_internal node_tenant_capabilities_cache SELECT NO YES +NULL public system crdb_internal node_transaction_statistics SELECT NO YES +NULL public system crdb_internal node_transactions SELECT NO YES +NULL public system crdb_internal node_txn_execution_insights SELECT NO YES +NULL public system crdb_internal node_txn_stats SELECT NO YES +NULL public system crdb_internal partitions SELECT NO YES +NULL public system crdb_internal pg_catalog_table_is_implemented SELECT NO YES +NULL public system crdb_internal ranges SELECT NO YES +NULL public system crdb_internal ranges_no_leases SELECT NO YES +NULL public system crdb_internal regions SELECT NO YES +NULL public system crdb_internal schema_changes SELECT NO YES +NULL public system crdb_internal session_trace SELECT NO YES +NULL public system crdb_internal session_variables SELECT NO YES +NULL public system crdb_internal statement_statistics SELECT NO YES +NULL public system crdb_internal statement_statistics_persisted SELECT NO YES +NULL public system crdb_internal statement_statistics_persisted_v22_2 SELECT NO YES +NULL public system crdb_internal super_regions SELECT NO YES +NULL public system crdb_internal system_jobs SELECT NO YES +NULL public system crdb_internal table_columns SELECT NO YES +NULL public system crdb_internal table_indexes SELECT NO YES +NULL public system crdb_internal table_row_statistics SELECT NO YES +NULL public system crdb_internal table_spans SELECT NO YES +NULL public system crdb_internal tables SELECT NO YES +NULL public system crdb_internal tenant_usage_details SELECT NO YES +NULL public system crdb_internal transaction_contention_events SELECT NO YES +NULL public system crdb_internal transaction_statistics SELECT NO YES +NULL public system crdb_internal transaction_statistics_persisted SELECT NO YES +NULL public system crdb_internal transaction_statistics_persisted_v22_2 SELECT NO YES +NULL public system crdb_internal zones SELECT NO YES +NULL public system information_schema administrable_role_authorizations SELECT NO YES +NULL public system information_schema applicable_roles SELECT NO YES +NULL public system information_schema attributes SELECT NO YES +NULL public system information_schema character_sets SELECT NO YES +NULL public system information_schema check_constraint_routine_usage SELECT NO YES +NULL public system information_schema check_constraints SELECT NO YES +NULL public system information_schema collation_character_set_applicability SELECT NO YES +NULL public system information_schema collations SELECT NO YES +NULL public system information_schema column_column_usage SELECT NO YES +NULL public system information_schema column_domain_usage SELECT NO YES +NULL public system information_schema column_options SELECT NO YES +NULL public system information_schema column_privileges SELECT NO YES +NULL public system information_schema column_statistics SELECT NO YES +NULL public system information_schema column_udt_usage SELECT NO YES +NULL public system information_schema columns SELECT NO YES +NULL public system information_schema columns_extensions SELECT NO YES +NULL public system information_schema constraint_column_usage SELECT NO YES +NULL public system information_schema constraint_table_usage SELECT NO YES +NULL public system information_schema data_type_privileges SELECT NO YES +NULL public system information_schema domain_constraints SELECT NO YES +NULL public system information_schema domain_udt_usage SELECT NO YES +NULL public system information_schema domains SELECT NO YES +NULL public system information_schema element_types SELECT NO YES +NULL public system information_schema enabled_roles SELECT NO YES +NULL public system information_schema engines SELECT NO YES +NULL public system information_schema events SELECT NO YES +NULL public system information_schema files SELECT NO YES +NULL public system information_schema foreign_data_wrapper_options SELECT NO YES +NULL public system information_schema foreign_data_wrappers SELECT NO YES +NULL public system information_schema foreign_server_options SELECT NO YES +NULL public system information_schema foreign_servers SELECT NO YES +NULL public system information_schema foreign_table_options SELECT NO YES +NULL public system information_schema foreign_tables SELECT NO YES +NULL public system information_schema information_schema_catalog_name SELECT NO YES +NULL public system information_schema key_column_usage SELECT NO YES +NULL public system information_schema keywords SELECT NO YES +NULL public system information_schema optimizer_trace SELECT NO YES +NULL public system information_schema parameters SELECT NO YES +NULL public system information_schema partitions SELECT NO YES +NULL public system information_schema plugins SELECT NO YES +NULL public system information_schema processlist SELECT NO YES +NULL public system information_schema profiling SELECT NO YES +NULL public system information_schema referential_constraints SELECT NO YES +NULL public system information_schema resource_groups SELECT NO YES +NULL public system information_schema role_column_grants SELECT NO YES +NULL public system information_schema role_routine_grants SELECT NO YES +NULL public system information_schema role_table_grants SELECT NO YES +NULL public system information_schema role_udt_grants SELECT NO YES +NULL public system information_schema role_usage_grants SELECT NO YES +NULL public system information_schema routine_privileges SELECT NO YES +NULL public system information_schema routines SELECT NO YES +NULL public system information_schema schema_privileges SELECT NO YES +NULL public system information_schema schemata SELECT NO YES +NULL public system information_schema schemata_extensions SELECT NO YES +NULL public system information_schema sequences SELECT NO YES +NULL public system information_schema session_variables SELECT NO YES +NULL public system information_schema sql_features SELECT NO YES +NULL public system information_schema sql_implementation_info SELECT NO YES +NULL public system information_schema sql_parts SELECT NO YES +NULL public system information_schema sql_sizing SELECT NO YES +NULL public system information_schema st_geometry_columns SELECT NO YES +NULL public system information_schema st_spatial_reference_systems SELECT NO YES +NULL public system information_schema st_units_of_measure SELECT NO YES +NULL public system information_schema statistics SELECT NO YES +NULL public system information_schema table_constraints SELECT NO YES +NULL public system information_schema table_constraints_extensions SELECT NO YES +NULL public system information_schema table_privileges SELECT NO YES +NULL public system information_schema tables SELECT NO YES +NULL public system information_schema tables_extensions SELECT NO YES +NULL public system information_schema tablespaces SELECT NO YES +NULL public system information_schema tablespaces_extensions SELECT NO YES +NULL public system information_schema transforms SELECT NO YES +NULL public system information_schema triggered_update_columns SELECT NO YES +NULL public system information_schema triggers SELECT NO YES +NULL public system information_schema type_privileges SELECT NO YES +NULL public system information_schema udt_privileges SELECT NO YES +NULL public system information_schema usage_privileges SELECT NO YES +NULL public system information_schema user_attributes SELECT NO YES +NULL public system information_schema user_defined_types SELECT NO YES +NULL public system information_schema user_mapping_options SELECT NO YES +NULL public system information_schema user_mappings SELECT NO YES +NULL public system information_schema user_privileges SELECT NO YES +NULL public system information_schema view_column_usage SELECT NO YES +NULL public system information_schema view_routine_usage SELECT NO YES +NULL public system information_schema view_table_usage SELECT NO YES +NULL public system information_schema views SELECT NO YES +NULL public system pg_catalog pg_aggregate SELECT NO YES +NULL public system pg_catalog pg_am SELECT NO YES +NULL public system pg_catalog pg_amop SELECT NO YES +NULL public system pg_catalog pg_amproc SELECT NO YES +NULL public system pg_catalog pg_attrdef SELECT NO YES +NULL public system pg_catalog pg_attribute SELECT NO YES +NULL public system pg_catalog pg_auth_members SELECT NO YES +NULL public system pg_catalog pg_authid SELECT NO YES +NULL public system pg_catalog pg_available_extension_versions SELECT NO YES +NULL public system pg_catalog pg_available_extensions SELECT NO YES +NULL public system pg_catalog pg_cast SELECT NO YES +NULL public system pg_catalog pg_class SELECT NO YES +NULL public system pg_catalog pg_collation SELECT NO YES +NULL public system pg_catalog pg_config SELECT NO YES +NULL public system pg_catalog pg_constraint SELECT NO YES +NULL public system pg_catalog pg_conversion SELECT NO YES +NULL public system pg_catalog pg_cursors SELECT NO YES +NULL public system pg_catalog pg_database SELECT NO YES +NULL public system pg_catalog pg_db_role_setting SELECT NO YES +NULL public system pg_catalog pg_default_acl SELECT NO YES +NULL public system pg_catalog pg_depend SELECT NO YES +NULL public system pg_catalog pg_description SELECT NO YES +NULL public system pg_catalog pg_enum SELECT NO YES +NULL public system pg_catalog pg_event_trigger SELECT NO YES +NULL public system pg_catalog pg_extension SELECT NO YES +NULL public system pg_catalog pg_file_settings SELECT NO YES +NULL public system pg_catalog pg_foreign_data_wrapper SELECT NO YES +NULL public system pg_catalog pg_foreign_server SELECT NO YES +NULL public system pg_catalog pg_foreign_table SELECT NO YES +NULL public system pg_catalog pg_group SELECT NO YES +NULL public system pg_catalog pg_hba_file_rules SELECT NO YES +NULL public system pg_catalog pg_index SELECT NO YES +NULL public system pg_catalog pg_indexes SELECT NO YES +NULL public system pg_catalog pg_inherits SELECT NO YES +NULL public system pg_catalog pg_init_privs SELECT NO YES +NULL public system pg_catalog pg_language SELECT NO YES +NULL public system pg_catalog pg_largeobject SELECT NO YES +NULL public system pg_catalog pg_largeobject_metadata SELECT NO YES +NULL public system pg_catalog pg_locks SELECT NO YES +NULL public system pg_catalog pg_matviews SELECT NO YES +NULL public system pg_catalog pg_namespace SELECT NO YES +NULL public system pg_catalog pg_opclass SELECT NO YES +NULL public system pg_catalog pg_operator SELECT NO YES +NULL public system pg_catalog pg_opfamily SELECT NO YES +NULL public system pg_catalog pg_partitioned_table SELECT NO YES +NULL public system pg_catalog pg_policies SELECT NO YES +NULL public system pg_catalog pg_policy SELECT NO YES +NULL public system pg_catalog pg_prepared_statements SELECT NO YES +NULL public system pg_catalog pg_prepared_xacts SELECT NO YES +NULL public system pg_catalog pg_proc SELECT NO YES +NULL public system pg_catalog pg_publication SELECT NO YES +NULL public system pg_catalog pg_publication_rel SELECT NO YES +NULL public system pg_catalog pg_publication_tables SELECT NO YES +NULL public system pg_catalog pg_range SELECT NO YES +NULL public system pg_catalog pg_replication_origin SELECT NO YES +NULL public system pg_catalog pg_replication_origin_status SELECT NO YES +NULL public system pg_catalog pg_replication_slots SELECT NO YES +NULL public system pg_catalog pg_rewrite SELECT NO YES +NULL public system pg_catalog pg_roles SELECT NO YES +NULL public system pg_catalog pg_rules SELECT NO YES +NULL public system pg_catalog pg_seclabel SELECT NO YES +NULL public system pg_catalog pg_seclabels SELECT NO YES +NULL public system pg_catalog pg_sequence SELECT NO YES +NULL public system pg_catalog pg_sequences SELECT NO YES +NULL public system pg_catalog pg_settings SELECT NO YES +NULL public system pg_catalog pg_shadow SELECT NO YES +NULL public system pg_catalog pg_shdepend SELECT NO YES +NULL public system pg_catalog pg_shdescription SELECT NO YES +NULL public system pg_catalog pg_shmem_allocations SELECT NO YES +NULL public system pg_catalog pg_shseclabel SELECT NO YES +NULL public system pg_catalog pg_stat_activity SELECT NO YES +NULL public system pg_catalog pg_stat_all_indexes SELECT NO YES +NULL public system pg_catalog pg_stat_all_tables SELECT NO YES +NULL public system pg_catalog pg_stat_archiver SELECT NO YES +NULL public system pg_catalog pg_stat_bgwriter SELECT NO YES +NULL public system pg_catalog pg_stat_database SELECT NO YES +NULL public system pg_catalog pg_stat_database_conflicts SELECT NO YES +NULL public system pg_catalog pg_stat_gssapi SELECT NO YES +NULL public system pg_catalog pg_stat_progress_analyze SELECT NO YES +NULL public system pg_catalog pg_stat_progress_basebackup SELECT NO YES +NULL public system pg_catalog pg_stat_progress_cluster SELECT NO YES +NULL public system pg_catalog pg_stat_progress_create_index SELECT NO YES +NULL public system pg_catalog pg_stat_progress_vacuum SELECT NO YES +NULL public system pg_catalog pg_stat_replication SELECT NO YES +NULL public system pg_catalog pg_stat_slru SELECT NO YES +NULL public system pg_catalog pg_stat_ssl SELECT NO YES +NULL public system pg_catalog pg_stat_subscription SELECT NO YES +NULL public system pg_catalog pg_stat_sys_indexes SELECT NO YES +NULL public system pg_catalog pg_stat_sys_tables SELECT NO YES +NULL public system pg_catalog pg_stat_user_functions SELECT NO YES +NULL public system pg_catalog pg_stat_user_indexes SELECT NO YES +NULL public system pg_catalog pg_stat_user_tables SELECT NO YES +NULL public system pg_catalog pg_stat_wal_receiver SELECT NO YES +NULL public system pg_catalog pg_stat_xact_all_tables SELECT NO YES +NULL public system pg_catalog pg_stat_xact_sys_tables SELECT NO YES +NULL public system pg_catalog pg_stat_xact_user_functions SELECT NO YES +NULL public system pg_catalog pg_stat_xact_user_tables SELECT NO YES +NULL public system pg_catalog pg_statio_all_indexes SELECT NO YES +NULL public system pg_catalog pg_statio_all_sequences SELECT NO YES +NULL public system pg_catalog pg_statio_all_tables SELECT NO YES +NULL public system pg_catalog pg_statio_sys_indexes SELECT NO YES +NULL public system pg_catalog pg_statio_sys_sequences SELECT NO YES +NULL public system pg_catalog pg_statio_sys_tables SELECT NO YES +NULL public system pg_catalog pg_statio_user_indexes SELECT NO YES +NULL public system pg_catalog pg_statio_user_sequences SELECT NO YES +NULL public system pg_catalog pg_statio_user_tables SELECT NO YES +NULL public system pg_catalog pg_statistic SELECT NO YES +NULL public system pg_catalog pg_statistic_ext SELECT NO YES +NULL public system pg_catalog pg_statistic_ext_data SELECT NO YES +NULL public system pg_catalog pg_stats SELECT NO YES +NULL public system pg_catalog pg_stats_ext SELECT NO YES +NULL public system pg_catalog pg_subscription SELECT NO YES +NULL public system pg_catalog pg_subscription_rel SELECT NO YES +NULL public system pg_catalog pg_tables SELECT NO YES +NULL public system pg_catalog pg_tablespace SELECT NO YES +NULL public system pg_catalog pg_timezone_abbrevs SELECT NO YES +NULL public system pg_catalog pg_timezone_names SELECT NO YES +NULL public system pg_catalog pg_transform SELECT NO YES +NULL public system pg_catalog pg_trigger SELECT NO YES +NULL public system pg_catalog pg_ts_config SELECT NO YES +NULL public system pg_catalog pg_ts_config_map SELECT NO YES +NULL public system pg_catalog pg_ts_dict SELECT NO YES +NULL public system pg_catalog pg_ts_parser SELECT NO YES +NULL public system pg_catalog pg_ts_template SELECT NO YES +NULL public system pg_catalog pg_type SELECT NO YES +NULL public system pg_catalog pg_user SELECT NO YES +NULL public system pg_catalog pg_user_mapping SELECT NO YES +NULL public system pg_catalog pg_user_mappings SELECT NO YES +NULL public system pg_catalog pg_views SELECT NO YES +NULL public system pg_extension geography_columns SELECT NO YES +NULL public system pg_extension geometry_columns SELECT NO YES +NULL public system pg_extension spatial_ref_sys SELECT NO YES +NULL admin system public comments DELETE YES NO +NULL admin system public comments INSERT YES NO +NULL admin system public comments SELECT YES YES +NULL admin system public comments UPDATE YES NO +NULL public system public comments SELECT NO YES +NULL root system public comments DELETE YES NO +NULL root system public comments INSERT YES NO +NULL root system public comments SELECT YES YES +NULL root system public comments UPDATE YES NO +NULL admin system public database_role_settings DELETE YES NO +NULL admin system public database_role_settings INSERT YES NO +NULL admin system public database_role_settings SELECT YES YES +NULL admin system public database_role_settings UPDATE YES NO +NULL root system public database_role_settings DELETE YES NO +NULL root system public database_role_settings INSERT YES NO +NULL root system public database_role_settings SELECT YES YES +NULL root system public database_role_settings UPDATE YES NO +NULL admin system public descriptor SELECT YES YES +NULL root system public descriptor SELECT YES YES +NULL admin system public descriptor_id_seq SELECT YES YES +NULL root system public descriptor_id_seq SELECT YES YES +NULL admin system public eventlog DELETE YES NO +NULL admin system public eventlog INSERT YES NO +NULL admin system public eventlog SELECT YES YES +NULL admin system public eventlog UPDATE YES NO +NULL root system public eventlog DELETE YES NO +NULL root system public eventlog INSERT YES NO +NULL root system public eventlog SELECT YES YES +NULL root system public eventlog UPDATE YES NO +NULL admin system public external_connections DELETE YES NO +NULL admin system public external_connections INSERT YES NO +NULL admin system public external_connections SELECT YES YES +NULL admin system public external_connections UPDATE YES NO +NULL root system public external_connections DELETE YES NO +NULL root system public external_connections INSERT YES NO +NULL root system public external_connections SELECT YES YES +NULL root system public external_connections UPDATE YES NO +NULL admin system public job_info DELETE YES NO +NULL admin system public job_info INSERT YES NO +NULL admin system public job_info SELECT YES YES +NULL admin system public job_info UPDATE YES NO +NULL root system public job_info DELETE YES NO +NULL root system public job_info INSERT YES NO +NULL root system public job_info SELECT YES YES +NULL root system public job_info UPDATE YES NO +NULL admin system public jobs DELETE YES NO +NULL admin system public jobs INSERT YES NO +NULL admin system public jobs SELECT YES YES +NULL admin system public jobs UPDATE YES NO +NULL root system public jobs DELETE YES NO +NULL root system public jobs INSERT YES NO +NULL root system public jobs SELECT YES YES +NULL root system public jobs UPDATE YES NO +NULL admin system public join_tokens DELETE YES NO +NULL admin system public join_tokens INSERT YES NO +NULL admin system public join_tokens SELECT YES YES +NULL admin system public join_tokens UPDATE YES NO +NULL root system public join_tokens DELETE YES NO +NULL root system public join_tokens INSERT YES NO +NULL root system public join_tokens SELECT YES YES +NULL root system public join_tokens UPDATE YES NO +NULL admin system public lease DELETE YES NO +NULL admin system public lease INSERT YES NO +NULL admin system public lease SELECT YES YES +NULL admin system public lease UPDATE YES NO +NULL root system public lease DELETE YES NO +NULL root system public lease INSERT YES NO +NULL root system public lease SELECT YES YES +NULL root system public lease UPDATE YES NO +NULL admin system public locations DELETE YES NO +NULL admin system public locations INSERT YES NO +NULL admin system public locations SELECT YES YES +NULL admin system public locations UPDATE YES NO +NULL root system public locations DELETE YES NO +NULL root system public locations INSERT YES NO +NULL root system public locations SELECT YES YES +NULL root system public locations UPDATE YES NO +NULL admin system public migrations DELETE YES NO +NULL admin system public migrations INSERT YES NO +NULL admin system public migrations SELECT YES YES +NULL admin system public migrations UPDATE YES NO +NULL root system public migrations DELETE YES NO +NULL root system public migrations INSERT YES NO +NULL root system public migrations SELECT YES YES +NULL root system public migrations UPDATE YES NO +NULL admin system public namespace SELECT YES YES +NULL root system public namespace SELECT YES YES +NULL admin system public privileges DELETE YES NO +NULL admin system public privileges INSERT YES NO +NULL admin system public privileges SELECT YES YES +NULL admin system public privileges UPDATE YES NO +NULL root system public privileges DELETE YES NO +NULL root system public privileges INSERT YES NO +NULL root system public privileges SELECT YES YES +NULL root system public privileges UPDATE YES NO +NULL admin system public protected_ts_meta SELECT YES YES +NULL root system public protected_ts_meta SELECT YES YES +NULL admin system public protected_ts_records SELECT YES YES +NULL root system public protected_ts_records SELECT YES YES +NULL admin system public rangelog DELETE YES NO +NULL admin system public rangelog INSERT YES NO +NULL admin system public rangelog SELECT YES YES +NULL admin system public rangelog UPDATE YES NO +NULL root system public rangelog DELETE YES NO +NULL root system public rangelog INSERT YES NO +NULL root system public rangelog SELECT YES YES +NULL root system public rangelog UPDATE YES NO +NULL admin system public replication_constraint_stats DELETE YES NO +NULL admin system public replication_constraint_stats INSERT YES NO +NULL admin system public replication_constraint_stats SELECT YES YES +NULL admin system public replication_constraint_stats UPDATE YES NO +NULL root system public replication_constraint_stats DELETE YES NO +NULL root system public replication_constraint_stats INSERT YES NO +NULL root system public replication_constraint_stats SELECT YES YES +NULL root system public replication_constraint_stats UPDATE YES NO +NULL admin system public replication_critical_localities DELETE YES NO +NULL admin system public replication_critical_localities INSERT YES NO +NULL admin system public replication_critical_localities SELECT YES YES +NULL admin system public replication_critical_localities UPDATE YES NO +NULL root system public replication_critical_localities DELETE YES NO +NULL root system public replication_critical_localities INSERT YES NO +NULL root system public replication_critical_localities SELECT YES YES +NULL root system public replication_critical_localities UPDATE YES NO +NULL admin system public replication_stats DELETE YES NO +NULL admin system public replication_stats INSERT YES NO +NULL admin system public replication_stats SELECT YES YES +NULL admin system public replication_stats UPDATE YES NO +NULL root system public replication_stats DELETE YES NO +NULL root system public replication_stats INSERT YES NO +NULL root system public replication_stats SELECT YES YES +NULL root system public replication_stats UPDATE YES NO +NULL admin system public reports_meta DELETE YES NO +NULL admin system public reports_meta INSERT YES NO +NULL admin system public reports_meta SELECT YES YES +NULL admin system public reports_meta UPDATE YES NO +NULL root system public reports_meta DELETE YES NO +NULL root system public reports_meta INSERT YES NO +NULL root system public reports_meta SELECT YES YES +NULL root system public reports_meta UPDATE YES NO +NULL admin system public role_id_seq SELECT YES YES +NULL admin system public role_id_seq UPDATE YES NO +NULL admin system public role_id_seq USAGE YES NO +NULL root system public role_id_seq SELECT YES YES +NULL root system public role_id_seq UPDATE YES NO +NULL root system public role_id_seq USAGE YES NO +NULL admin system public role_members DELETE YES NO +NULL admin system public role_members INSERT YES NO +NULL admin system public role_members SELECT YES YES +NULL admin system public role_members UPDATE YES NO +NULL root system public role_members DELETE YES NO +NULL root system public role_members INSERT YES NO +NULL root system public role_members SELECT YES YES +NULL root system public role_members UPDATE YES NO +NULL admin system public role_options DELETE YES NO +NULL admin system public role_options INSERT YES NO +NULL admin system public role_options SELECT YES YES +NULL admin system public role_options UPDATE YES NO +NULL root system public role_options DELETE YES NO +NULL root system public role_options INSERT YES NO +NULL root system public role_options SELECT YES YES +NULL root system public role_options UPDATE YES NO +NULL admin system public scheduled_jobs DELETE YES NO +NULL admin system public scheduled_jobs INSERT YES NO +NULL admin system public scheduled_jobs SELECT YES YES +NULL admin system public scheduled_jobs UPDATE YES NO +NULL root system public scheduled_jobs DELETE YES NO +NULL root system public scheduled_jobs INSERT YES NO +NULL root system public scheduled_jobs SELECT YES YES +NULL root system public scheduled_jobs UPDATE YES NO +NULL admin system public settings DELETE YES NO +NULL admin system public settings INSERT YES NO +NULL admin system public settings SELECT YES YES +NULL admin system public settings UPDATE YES NO +NULL root system public settings DELETE YES NO +NULL root system public settings INSERT YES NO +NULL root system public settings SELECT YES YES +NULL root system public settings UPDATE YES NO +NULL admin system public span_configurations DELETE YES NO +NULL admin system public span_configurations INSERT YES NO +NULL admin system public span_configurations SELECT YES YES +NULL admin system public span_configurations UPDATE YES NO +NULL root system public span_configurations DELETE YES NO +NULL root system public span_configurations INSERT YES NO +NULL root system public span_configurations SELECT YES YES +NULL root system public span_configurations UPDATE YES NO +NULL admin system public span_stats_buckets DELETE YES NO +NULL admin system public span_stats_buckets INSERT YES NO +NULL admin system public span_stats_buckets SELECT YES YES +NULL admin system public span_stats_buckets UPDATE YES NO +NULL root system public span_stats_buckets DELETE YES NO +NULL root system public span_stats_buckets INSERT YES NO +NULL root system public span_stats_buckets SELECT YES YES +NULL root system public span_stats_buckets UPDATE YES NO +NULL admin system public span_stats_samples DELETE YES NO +NULL admin system public span_stats_samples INSERT YES NO +NULL admin system public span_stats_samples SELECT YES YES +NULL admin system public span_stats_samples UPDATE YES NO +NULL root system public span_stats_samples DELETE YES NO +NULL root system public span_stats_samples INSERT YES NO +NULL root system public span_stats_samples SELECT YES YES +NULL root system public span_stats_samples UPDATE YES NO +NULL admin system public span_stats_tenant_boundaries DELETE YES NO +NULL admin system public span_stats_tenant_boundaries INSERT YES NO +NULL admin system public span_stats_tenant_boundaries SELECT YES YES +NULL admin system public span_stats_tenant_boundaries UPDATE YES NO +NULL root system public span_stats_tenant_boundaries DELETE YES NO +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 span_stats_unique_keys DELETE YES NO +NULL admin system public span_stats_unique_keys INSERT YES NO +NULL admin system public span_stats_unique_keys SELECT YES YES +NULL admin system public span_stats_unique_keys UPDATE YES NO +NULL root system public span_stats_unique_keys DELETE YES NO +NULL root system public span_stats_unique_keys INSERT YES NO +NULL root system public span_stats_unique_keys SELECT YES YES +NULL root system public span_stats_unique_keys UPDATE YES NO +NULL admin system public sql_instances DELETE YES NO +NULL admin system public sql_instances INSERT YES NO +NULL admin system public sql_instances SELECT YES YES +NULL admin system public sql_instances UPDATE YES NO +NULL root system public sql_instances DELETE YES NO +NULL root system public sql_instances INSERT YES NO +NULL root system public sql_instances SELECT YES YES +NULL root system public sql_instances UPDATE YES NO +NULL admin system public sqlliveness DELETE YES NO +NULL admin system public sqlliveness INSERT YES NO +NULL admin system public sqlliveness SELECT YES YES +NULL admin system public sqlliveness UPDATE YES NO +NULL root system public sqlliveness DELETE YES NO +NULL root system public sqlliveness INSERT YES NO +NULL root system public sqlliveness SELECT YES YES +NULL root system public sqlliveness UPDATE YES NO +NULL admin system public statement_activity SELECT YES YES +NULL root system public statement_activity SELECT YES YES +NULL admin system public statement_bundle_chunks DELETE YES NO +NULL admin system public statement_bundle_chunks INSERT YES NO +NULL admin system public statement_bundle_chunks SELECT YES YES +NULL admin system public statement_bundle_chunks UPDATE YES NO +NULL root system public statement_bundle_chunks DELETE YES NO +NULL root system public statement_bundle_chunks INSERT YES NO +NULL root system public statement_bundle_chunks SELECT YES YES +NULL root system public statement_bundle_chunks UPDATE YES NO +NULL admin system public statement_diagnostics DELETE YES NO +NULL admin system public statement_diagnostics INSERT YES NO +NULL admin system public statement_diagnostics SELECT YES YES +NULL admin system public statement_diagnostics UPDATE YES NO +NULL root system public statement_diagnostics DELETE YES NO +NULL root system public statement_diagnostics INSERT YES NO +NULL root system public statement_diagnostics SELECT YES YES +NULL root system public statement_diagnostics UPDATE YES NO +NULL admin system public statement_diagnostics_requests DELETE YES NO +NULL admin system public statement_diagnostics_requests INSERT YES NO +NULL admin system public statement_diagnostics_requests SELECT YES YES +NULL admin system public statement_diagnostics_requests UPDATE YES NO +NULL root system public statement_diagnostics_requests DELETE YES NO +NULL root system public statement_diagnostics_requests INSERT YES NO +NULL root system public statement_diagnostics_requests SELECT YES YES +NULL root system public statement_diagnostics_requests UPDATE YES NO +NULL admin system public statement_statistics SELECT YES YES +NULL root system public statement_statistics SELECT YES YES +NULL admin system public table_statistics DELETE YES NO +NULL admin system public table_statistics INSERT YES NO +NULL admin system public table_statistics SELECT YES YES +NULL admin system public table_statistics UPDATE YES NO +NULL root system public table_statistics DELETE YES NO +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_id_seq SELECT YES YES +NULL root system public tenant_id_seq SELECT YES YES +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 +NULL admin system public tenant_settings UPDATE YES NO +NULL root system public tenant_settings DELETE YES NO +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 +NULL admin system public tenant_usage UPDATE YES NO +NULL root system public tenant_usage DELETE YES NO +NULL root system public tenant_usage INSERT YES NO +NULL root system public tenant_usage SELECT YES YES +NULL root system public tenant_usage UPDATE YES NO +NULL admin system public tenants SELECT YES YES +NULL root system public tenants SELECT YES YES +NULL admin system public transaction_activity SELECT YES YES +NULL root system public transaction_activity SELECT YES YES +NULL admin system public transaction_statistics SELECT YES YES +NULL root system public transaction_statistics SELECT YES YES +NULL admin system public ui DELETE YES NO +NULL admin system public ui INSERT YES NO +NULL admin system public ui SELECT YES YES +NULL admin system public ui UPDATE YES NO +NULL root system public ui DELETE YES NO +NULL root system public ui INSERT YES NO +NULL root system public ui SELECT YES YES +NULL root system public ui UPDATE YES NO +NULL admin system public users DELETE YES NO +NULL admin system public users INSERT YES NO +NULL admin system public users SELECT YES YES +NULL admin system public users UPDATE YES NO +NULL root system public users DELETE YES NO +NULL root system public users INSERT YES NO +NULL root system public users SELECT YES YES +NULL root system public users UPDATE YES NO +NULL admin system public web_sessions DELETE YES NO +NULL admin system public web_sessions INSERT YES NO +NULL admin system public web_sessions SELECT YES YES +NULL admin system public web_sessions UPDATE YES NO +NULL root system public web_sessions DELETE YES NO +NULL root system public web_sessions INSERT YES NO +NULL root system public web_sessions SELECT YES YES +NULL root system public web_sessions UPDATE YES NO +NULL admin system public zones DELETE YES NO +NULL admin system public zones INSERT YES NO +NULL admin system public zones SELECT YES YES +NULL admin system public zones UPDATE YES NO +NULL root system public zones DELETE YES NO +NULL root system public zones INSERT YES NO +NULL root system public zones SELECT YES YES +NULL root system public zones UPDATE YES NO query TTTTTTTT colnames SELECT * FROM system.information_schema.role_table_grants ---- -grantor grantee table_catalog table_schema table_name privilege_type is_grantable with_hierarchy -NULL public system crdb_internal active_range_feeds SELECT NO YES -NULL public system crdb_internal backward_dependencies SELECT NO YES -NULL public system crdb_internal builtin_functions SELECT NO YES -NULL public system crdb_internal cluster_contended_indexes SELECT NO YES -NULL public system crdb_internal cluster_contended_keys SELECT NO YES -NULL public system crdb_internal cluster_contended_tables SELECT NO YES -NULL public system crdb_internal cluster_contention_events SELECT NO YES -NULL public system crdb_internal cluster_database_privileges SELECT NO YES -NULL public system crdb_internal cluster_distsql_flows SELECT NO YES -NULL public system crdb_internal cluster_execution_insights SELECT NO YES -NULL public system crdb_internal cluster_inflight_traces SELECT NO YES -NULL public system crdb_internal cluster_locks SELECT NO YES -NULL public system crdb_internal cluster_queries SELECT NO YES -NULL public system crdb_internal cluster_sessions SELECT NO YES -NULL public system crdb_internal cluster_settings SELECT NO YES -NULL public system crdb_internal cluster_statement_statistics SELECT NO YES -NULL public system crdb_internal cluster_transaction_statistics SELECT NO YES -NULL public system crdb_internal cluster_transactions SELECT NO YES -NULL public system crdb_internal cluster_txn_execution_insights SELECT NO YES -NULL public system crdb_internal create_function_statements SELECT NO YES -NULL public system crdb_internal create_schema_statements SELECT NO YES -NULL public system crdb_internal create_statements SELECT NO YES -NULL public system crdb_internal create_type_statements SELECT NO YES -NULL public system crdb_internal cross_db_references SELECT NO YES -NULL public system crdb_internal databases SELECT NO YES -NULL public system crdb_internal default_privileges SELECT NO YES -NULL public system crdb_internal feature_usage SELECT NO YES -NULL public system crdb_internal forward_dependencies SELECT NO YES -NULL public system crdb_internal gossip_alerts SELECT NO YES -NULL public system crdb_internal gossip_liveness SELECT NO YES -NULL public system crdb_internal gossip_network SELECT NO YES -NULL public system crdb_internal gossip_nodes SELECT NO YES -NULL public system crdb_internal index_columns SELECT NO YES -NULL public system crdb_internal index_spans SELECT NO YES -NULL public system crdb_internal index_usage_statistics SELECT NO YES -NULL public system crdb_internal invalid_objects SELECT NO YES -NULL public system crdb_internal jobs SELECT NO YES -NULL public system crdb_internal kv_catalog_comments SELECT NO YES -NULL public system crdb_internal kv_catalog_descriptor SELECT NO YES -NULL public system crdb_internal kv_catalog_namespace SELECT NO YES -NULL public system crdb_internal kv_catalog_zones SELECT NO YES -NULL public system crdb_internal kv_dropped_relations SELECT NO YES -NULL public system crdb_internal kv_node_liveness SELECT NO YES -NULL public system crdb_internal kv_node_status SELECT NO YES -NULL public system crdb_internal kv_store_status SELECT NO YES -NULL public system crdb_internal leases SELECT NO YES -NULL public system crdb_internal lost_descriptors_with_data SELECT NO YES -NULL public system crdb_internal node_build_info SELECT NO YES -NULL public system crdb_internal node_contention_events SELECT NO YES -NULL public system crdb_internal node_distsql_flows SELECT NO YES -NULL public system crdb_internal node_execution_insights SELECT NO YES -NULL public system crdb_internal node_inflight_trace_spans SELECT NO YES -NULL public system crdb_internal node_memory_monitors SELECT NO YES -NULL public system crdb_internal node_metrics SELECT NO YES -NULL public system crdb_internal node_queries SELECT NO YES -NULL public system crdb_internal node_runtime_info SELECT NO YES -NULL public system crdb_internal node_sessions SELECT NO YES -NULL public system crdb_internal node_statement_statistics SELECT NO YES -NULL public system crdb_internal node_tenant_capabilities_cache SELECT NO YES -NULL public system crdb_internal node_transaction_statistics SELECT NO YES -NULL public system crdb_internal node_transactions SELECT NO YES -NULL public system crdb_internal node_txn_execution_insights SELECT NO YES -NULL public system crdb_internal node_txn_stats SELECT NO YES -NULL public system crdb_internal partitions SELECT NO YES -NULL public system crdb_internal pg_catalog_table_is_implemented SELECT NO YES -NULL public system crdb_internal ranges SELECT NO YES -NULL public system crdb_internal ranges_no_leases SELECT NO YES -NULL public system crdb_internal regions SELECT NO YES -NULL public system crdb_internal schema_changes SELECT NO YES -NULL public system crdb_internal session_trace SELECT NO YES -NULL public system crdb_internal session_variables SELECT NO YES -NULL public system crdb_internal statement_statistics SELECT NO YES -NULL public system crdb_internal statement_statistics_persisted SELECT NO YES -NULL public system crdb_internal statement_statistics_persisted_v22_2 SELECT NO YES -NULL public system crdb_internal super_regions SELECT NO YES -NULL public system crdb_internal system_jobs SELECT NO YES -NULL public system crdb_internal table_columns SELECT NO YES -NULL public system crdb_internal table_indexes SELECT NO YES -NULL public system crdb_internal table_row_statistics SELECT NO YES -NULL public system crdb_internal table_spans SELECT NO YES -NULL public system crdb_internal tables SELECT NO YES -NULL public system crdb_internal tenant_usage_details SELECT NO YES -NULL public system crdb_internal transaction_contention_events SELECT NO YES -NULL public system crdb_internal transaction_statistics SELECT NO YES -NULL public system crdb_internal transaction_statistics_persisted SELECT NO YES -NULL public system crdb_internal transaction_statistics_persisted_v22_2 SELECT NO YES -NULL public system crdb_internal zones SELECT NO YES -NULL public system information_schema administrable_role_authorizations SELECT NO YES -NULL public system information_schema applicable_roles SELECT NO YES -NULL public system information_schema attributes SELECT NO YES -NULL public system information_schema character_sets SELECT NO YES -NULL public system information_schema check_constraint_routine_usage SELECT NO YES -NULL public system information_schema check_constraints SELECT NO YES -NULL public system information_schema collation_character_set_applicability SELECT NO YES -NULL public system information_schema collations SELECT NO YES -NULL public system information_schema column_column_usage SELECT NO YES -NULL public system information_schema column_domain_usage SELECT NO YES -NULL public system information_schema column_options SELECT NO YES -NULL public system information_schema column_privileges SELECT NO YES -NULL public system information_schema column_statistics SELECT NO YES -NULL public system information_schema column_udt_usage SELECT NO YES -NULL public system information_schema columns SELECT NO YES -NULL public system information_schema columns_extensions SELECT NO YES -NULL public system information_schema constraint_column_usage SELECT NO YES -NULL public system information_schema constraint_table_usage SELECT NO YES -NULL public system information_schema data_type_privileges SELECT NO YES -NULL public system information_schema domain_constraints SELECT NO YES -NULL public system information_schema domain_udt_usage SELECT NO YES -NULL public system information_schema domains SELECT NO YES -NULL public system information_schema element_types SELECT NO YES -NULL public system information_schema enabled_roles SELECT NO YES -NULL public system information_schema engines SELECT NO YES -NULL public system information_schema events SELECT NO YES -NULL public system information_schema files SELECT NO YES -NULL public system information_schema foreign_data_wrapper_options SELECT NO YES -NULL public system information_schema foreign_data_wrappers SELECT NO YES -NULL public system information_schema foreign_server_options SELECT NO YES -NULL public system information_schema foreign_servers SELECT NO YES -NULL public system information_schema foreign_table_options SELECT NO YES -NULL public system information_schema foreign_tables SELECT NO YES -NULL public system information_schema information_schema_catalog_name SELECT NO YES -NULL public system information_schema key_column_usage SELECT NO YES -NULL public system information_schema keywords SELECT NO YES -NULL public system information_schema optimizer_trace SELECT NO YES -NULL public system information_schema parameters SELECT NO YES -NULL public system information_schema partitions SELECT NO YES -NULL public system information_schema plugins SELECT NO YES -NULL public system information_schema processlist SELECT NO YES -NULL public system information_schema profiling SELECT NO YES -NULL public system information_schema referential_constraints SELECT NO YES -NULL public system information_schema resource_groups SELECT NO YES -NULL public system information_schema role_column_grants SELECT NO YES -NULL public system information_schema role_routine_grants SELECT NO YES -NULL public system information_schema role_table_grants SELECT NO YES -NULL public system information_schema role_udt_grants SELECT NO YES -NULL public system information_schema role_usage_grants SELECT NO YES -NULL public system information_schema routine_privileges SELECT NO YES -NULL public system information_schema routines SELECT NO YES -NULL public system information_schema schema_privileges SELECT NO YES -NULL public system information_schema schemata SELECT NO YES -NULL public system information_schema schemata_extensions SELECT NO YES -NULL public system information_schema sequences SELECT NO YES -NULL public system information_schema session_variables SELECT NO YES -NULL public system information_schema sql_features SELECT NO YES -NULL public system information_schema sql_implementation_info SELECT NO YES -NULL public system information_schema sql_parts SELECT NO YES -NULL public system information_schema sql_sizing SELECT NO YES -NULL public system information_schema st_geometry_columns SELECT NO YES -NULL public system information_schema st_spatial_reference_systems SELECT NO YES -NULL public system information_schema st_units_of_measure SELECT NO YES -NULL public system information_schema statistics SELECT NO YES -NULL public system information_schema table_constraints SELECT NO YES -NULL public system information_schema table_constraints_extensions SELECT NO YES -NULL public system information_schema table_privileges SELECT NO YES -NULL public system information_schema tables SELECT NO YES -NULL public system information_schema tables_extensions SELECT NO YES -NULL public system information_schema tablespaces SELECT NO YES -NULL public system information_schema tablespaces_extensions SELECT NO YES -NULL public system information_schema transforms SELECT NO YES -NULL public system information_schema triggered_update_columns SELECT NO YES -NULL public system information_schema triggers SELECT NO YES -NULL public system information_schema type_privileges SELECT NO YES -NULL public system information_schema udt_privileges SELECT NO YES -NULL public system information_schema usage_privileges SELECT NO YES -NULL public system information_schema user_attributes SELECT NO YES -NULL public system information_schema user_defined_types SELECT NO YES -NULL public system information_schema user_mapping_options SELECT NO YES -NULL public system information_schema user_mappings SELECT NO YES -NULL public system information_schema user_privileges SELECT NO YES -NULL public system information_schema view_column_usage SELECT NO YES -NULL public system information_schema view_routine_usage SELECT NO YES -NULL public system information_schema view_table_usage SELECT NO YES -NULL public system information_schema views SELECT NO YES -NULL public system pg_catalog pg_aggregate SELECT NO YES -NULL public system pg_catalog pg_am SELECT NO YES -NULL public system pg_catalog pg_amop SELECT NO YES -NULL public system pg_catalog pg_amproc SELECT NO YES -NULL public system pg_catalog pg_attrdef SELECT NO YES -NULL public system pg_catalog pg_attribute SELECT NO YES -NULL public system pg_catalog pg_auth_members SELECT NO YES -NULL public system pg_catalog pg_authid SELECT NO YES -NULL public system pg_catalog pg_available_extension_versions SELECT NO YES -NULL public system pg_catalog pg_available_extensions SELECT NO YES -NULL public system pg_catalog pg_cast SELECT NO YES -NULL public system pg_catalog pg_class SELECT NO YES -NULL public system pg_catalog pg_collation SELECT NO YES -NULL public system pg_catalog pg_config SELECT NO YES -NULL public system pg_catalog pg_constraint SELECT NO YES -NULL public system pg_catalog pg_conversion SELECT NO YES -NULL public system pg_catalog pg_cursors SELECT NO YES -NULL public system pg_catalog pg_database SELECT NO YES -NULL public system pg_catalog pg_db_role_setting SELECT NO YES -NULL public system pg_catalog pg_default_acl SELECT NO YES -NULL public system pg_catalog pg_depend SELECT NO YES -NULL public system pg_catalog pg_description SELECT NO YES -NULL public system pg_catalog pg_enum SELECT NO YES -NULL public system pg_catalog pg_event_trigger SELECT NO YES -NULL public system pg_catalog pg_extension SELECT NO YES -NULL public system pg_catalog pg_file_settings SELECT NO YES -NULL public system pg_catalog pg_foreign_data_wrapper SELECT NO YES -NULL public system pg_catalog pg_foreign_server SELECT NO YES -NULL public system pg_catalog pg_foreign_table SELECT NO YES -NULL public system pg_catalog pg_group SELECT NO YES -NULL public system pg_catalog pg_hba_file_rules SELECT NO YES -NULL public system pg_catalog pg_index SELECT NO YES -NULL public system pg_catalog pg_indexes SELECT NO YES -NULL public system pg_catalog pg_inherits SELECT NO YES -NULL public system pg_catalog pg_init_privs SELECT NO YES -NULL public system pg_catalog pg_language SELECT NO YES -NULL public system pg_catalog pg_largeobject SELECT NO YES -NULL public system pg_catalog pg_largeobject_metadata SELECT NO YES -NULL public system pg_catalog pg_locks SELECT NO YES -NULL public system pg_catalog pg_matviews SELECT NO YES -NULL public system pg_catalog pg_namespace SELECT NO YES -NULL public system pg_catalog pg_opclass SELECT NO YES -NULL public system pg_catalog pg_operator SELECT NO YES -NULL public system pg_catalog pg_opfamily SELECT NO YES -NULL public system pg_catalog pg_partitioned_table SELECT NO YES -NULL public system pg_catalog pg_policies SELECT NO YES -NULL public system pg_catalog pg_policy SELECT NO YES -NULL public system pg_catalog pg_prepared_statements SELECT NO YES -NULL public system pg_catalog pg_prepared_xacts SELECT NO YES -NULL public system pg_catalog pg_proc SELECT NO YES -NULL public system pg_catalog pg_publication SELECT NO YES -NULL public system pg_catalog pg_publication_rel SELECT NO YES -NULL public system pg_catalog pg_publication_tables SELECT NO YES -NULL public system pg_catalog pg_range SELECT NO YES -NULL public system pg_catalog pg_replication_origin SELECT NO YES -NULL public system pg_catalog pg_replication_origin_status SELECT NO YES -NULL public system pg_catalog pg_replication_slots SELECT NO YES -NULL public system pg_catalog pg_rewrite SELECT NO YES -NULL public system pg_catalog pg_roles SELECT NO YES -NULL public system pg_catalog pg_rules SELECT NO YES -NULL public system pg_catalog pg_seclabel SELECT NO YES -NULL public system pg_catalog pg_seclabels SELECT NO YES -NULL public system pg_catalog pg_sequence SELECT NO YES -NULL public system pg_catalog pg_sequences SELECT NO YES -NULL public system pg_catalog pg_settings SELECT NO YES -NULL public system pg_catalog pg_shadow SELECT NO YES -NULL public system pg_catalog pg_shdepend SELECT NO YES -NULL public system pg_catalog pg_shdescription SELECT NO YES -NULL public system pg_catalog pg_shmem_allocations SELECT NO YES -NULL public system pg_catalog pg_shseclabel SELECT NO YES -NULL public system pg_catalog pg_stat_activity SELECT NO YES -NULL public system pg_catalog pg_stat_all_indexes SELECT NO YES -NULL public system pg_catalog pg_stat_all_tables SELECT NO YES -NULL public system pg_catalog pg_stat_archiver SELECT NO YES -NULL public system pg_catalog pg_stat_bgwriter SELECT NO YES -NULL public system pg_catalog pg_stat_database SELECT NO YES -NULL public system pg_catalog pg_stat_database_conflicts SELECT NO YES -NULL public system pg_catalog pg_stat_gssapi SELECT NO YES -NULL public system pg_catalog pg_stat_progress_analyze SELECT NO YES -NULL public system pg_catalog pg_stat_progress_basebackup SELECT NO YES -NULL public system pg_catalog pg_stat_progress_cluster SELECT NO YES -NULL public system pg_catalog pg_stat_progress_create_index SELECT NO YES -NULL public system pg_catalog pg_stat_progress_vacuum SELECT NO YES -NULL public system pg_catalog pg_stat_replication SELECT NO YES -NULL public system pg_catalog pg_stat_slru SELECT NO YES -NULL public system pg_catalog pg_stat_ssl SELECT NO YES -NULL public system pg_catalog pg_stat_subscription SELECT NO YES -NULL public system pg_catalog pg_stat_sys_indexes SELECT NO YES -NULL public system pg_catalog pg_stat_sys_tables SELECT NO YES -NULL public system pg_catalog pg_stat_user_functions SELECT NO YES -NULL public system pg_catalog pg_stat_user_indexes SELECT NO YES -NULL public system pg_catalog pg_stat_user_tables SELECT NO YES -NULL public system pg_catalog pg_stat_wal_receiver SELECT NO YES -NULL public system pg_catalog pg_stat_xact_all_tables SELECT NO YES -NULL public system pg_catalog pg_stat_xact_sys_tables SELECT NO YES -NULL public system pg_catalog pg_stat_xact_user_functions SELECT NO YES -NULL public system pg_catalog pg_stat_xact_user_tables SELECT NO YES -NULL public system pg_catalog pg_statio_all_indexes SELECT NO YES -NULL public system pg_catalog pg_statio_all_sequences SELECT NO YES -NULL public system pg_catalog pg_statio_all_tables SELECT NO YES -NULL public system pg_catalog pg_statio_sys_indexes SELECT NO YES -NULL public system pg_catalog pg_statio_sys_sequences SELECT NO YES -NULL public system pg_catalog pg_statio_sys_tables SELECT NO YES -NULL public system pg_catalog pg_statio_user_indexes SELECT NO YES -NULL public system pg_catalog pg_statio_user_sequences SELECT NO YES -NULL public system pg_catalog pg_statio_user_tables SELECT NO YES -NULL public system pg_catalog pg_statistic SELECT NO YES -NULL public system pg_catalog pg_statistic_ext SELECT NO YES -NULL public system pg_catalog pg_statistic_ext_data SELECT NO YES -NULL public system pg_catalog pg_stats SELECT NO YES -NULL public system pg_catalog pg_stats_ext SELECT NO YES -NULL public system pg_catalog pg_subscription SELECT NO YES -NULL public system pg_catalog pg_subscription_rel SELECT NO YES -NULL public system pg_catalog pg_tables SELECT NO YES -NULL public system pg_catalog pg_tablespace SELECT NO YES -NULL public system pg_catalog pg_timezone_abbrevs SELECT NO YES -NULL public system pg_catalog pg_timezone_names SELECT NO YES -NULL public system pg_catalog pg_transform SELECT NO YES -NULL public system pg_catalog pg_trigger SELECT NO YES -NULL public system pg_catalog pg_ts_config SELECT NO YES -NULL public system pg_catalog pg_ts_config_map SELECT NO YES -NULL public system pg_catalog pg_ts_dict SELECT NO YES -NULL public system pg_catalog pg_ts_parser SELECT NO YES -NULL public system pg_catalog pg_ts_template SELECT NO YES -NULL public system pg_catalog pg_type SELECT NO YES -NULL public system pg_catalog pg_user SELECT NO YES -NULL public system pg_catalog pg_user_mapping SELECT NO YES -NULL public system pg_catalog pg_user_mappings SELECT NO YES -NULL public system pg_catalog pg_views SELECT NO YES -NULL public system pg_extension geography_columns SELECT NO YES -NULL public system pg_extension geometry_columns SELECT NO YES -NULL public system pg_extension spatial_ref_sys SELECT NO YES -NULL admin system public descriptor SELECT YES YES -NULL root system public descriptor SELECT YES YES -NULL admin system public users DELETE YES NO -NULL admin system public users INSERT YES NO -NULL admin system public users SELECT YES YES -NULL admin system public users UPDATE YES NO -NULL root system public users DELETE YES NO -NULL root system public users INSERT YES NO -NULL root system public users SELECT YES YES -NULL root system public users UPDATE YES NO -NULL admin system public zones DELETE YES NO -NULL admin system public zones INSERT YES NO -NULL admin system public zones SELECT YES YES -NULL admin system public zones UPDATE YES NO -NULL root system public zones DELETE YES NO -NULL root system public zones INSERT YES NO -NULL root system public zones SELECT YES YES -NULL root system public zones UPDATE YES NO -NULL admin system public settings DELETE YES NO -NULL admin system public settings INSERT YES NO -NULL admin system public settings SELECT YES YES -NULL admin system public settings UPDATE YES NO -NULL root system public settings DELETE YES NO -NULL root system public settings INSERT YES NO -NULL root system public settings SELECT YES YES -NULL root system public settings UPDATE YES NO -NULL admin system public descriptor_id_seq SELECT YES YES -NULL root system public descriptor_id_seq SELECT YES YES -NULL admin system public tenants SELECT YES YES -NULL root system public tenants SELECT YES YES -NULL admin system public lease DELETE YES NO -NULL admin system public lease INSERT YES NO -NULL admin system public lease SELECT YES YES -NULL admin system public lease UPDATE YES NO -NULL root system public lease DELETE YES NO -NULL root system public lease INSERT YES NO -NULL root system public lease SELECT YES YES -NULL root system public lease UPDATE YES NO -NULL admin system public eventlog DELETE YES NO -NULL admin system public eventlog INSERT YES NO -NULL admin system public eventlog SELECT YES YES -NULL admin system public eventlog UPDATE YES NO -NULL root system public eventlog DELETE YES NO -NULL root system public eventlog INSERT YES NO -NULL root system public eventlog SELECT YES YES -NULL root system public eventlog UPDATE YES NO -NULL admin system public rangelog DELETE YES NO -NULL admin system public rangelog INSERT YES NO -NULL admin system public rangelog SELECT YES YES -NULL admin system public rangelog UPDATE YES NO -NULL root system public rangelog DELETE YES NO -NULL root system public rangelog INSERT YES NO -NULL root system public rangelog SELECT YES YES -NULL root system public rangelog UPDATE YES NO -NULL admin system public ui DELETE YES NO -NULL admin system public ui INSERT YES NO -NULL admin system public ui SELECT YES YES -NULL admin system public ui UPDATE YES NO -NULL root system public ui DELETE YES NO -NULL root system public ui INSERT YES NO -NULL root system public ui SELECT YES YES -NULL root system public ui UPDATE YES NO -NULL admin system public jobs DELETE YES NO -NULL admin system public jobs INSERT YES NO -NULL admin system public jobs SELECT YES YES -NULL admin system public jobs UPDATE YES NO -NULL root system public jobs DELETE YES NO -NULL root system public jobs INSERT YES NO -NULL root system public jobs SELECT YES YES -NULL root system public jobs UPDATE YES NO -NULL admin system public web_sessions DELETE YES NO -NULL admin system public web_sessions INSERT YES NO -NULL admin system public web_sessions SELECT YES YES -NULL admin system public web_sessions UPDATE YES NO -NULL root system public web_sessions DELETE YES NO -NULL root system public web_sessions INSERT YES NO -NULL root system public web_sessions SELECT YES YES -NULL root system public web_sessions UPDATE YES NO -NULL admin system public table_statistics DELETE YES NO -NULL admin system public table_statistics INSERT YES NO -NULL admin system public table_statistics SELECT YES YES -NULL admin system public table_statistics UPDATE YES NO -NULL root system public table_statistics DELETE YES NO -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 locations DELETE YES NO -NULL admin system public locations INSERT YES NO -NULL admin system public locations SELECT YES YES -NULL admin system public locations UPDATE YES NO -NULL root system public locations DELETE YES NO -NULL root system public locations INSERT YES NO -NULL root system public locations SELECT YES YES -NULL root system public locations UPDATE YES NO -NULL admin system public role_members DELETE YES NO -NULL admin system public role_members INSERT YES NO -NULL admin system public role_members SELECT YES YES -NULL admin system public role_members UPDATE YES NO -NULL root system public role_members DELETE YES NO -NULL root system public role_members INSERT YES NO -NULL root system public role_members SELECT YES YES -NULL root system public role_members UPDATE YES NO -NULL admin system public comments DELETE YES NO -NULL admin system public comments INSERT YES NO -NULL admin system public comments SELECT YES YES -NULL admin system public comments UPDATE YES NO -NULL public system public comments SELECT NO YES -NULL root system public comments DELETE YES NO -NULL root system public comments INSERT YES NO -NULL root system public comments SELECT YES YES -NULL root system public comments UPDATE YES NO -NULL admin system public replication_constraint_stats DELETE YES NO -NULL admin system public replication_constraint_stats INSERT YES NO -NULL admin system public replication_constraint_stats SELECT YES YES -NULL admin system public replication_constraint_stats UPDATE YES NO -NULL root system public replication_constraint_stats DELETE YES NO -NULL root system public replication_constraint_stats INSERT YES NO -NULL root system public replication_constraint_stats SELECT YES YES -NULL root system public replication_constraint_stats UPDATE YES NO -NULL admin system public replication_critical_localities DELETE YES NO -NULL admin system public replication_critical_localities INSERT YES NO -NULL admin system public replication_critical_localities SELECT YES YES -NULL admin system public replication_critical_localities UPDATE YES NO -NULL root system public replication_critical_localities DELETE YES NO -NULL root system public replication_critical_localities INSERT YES NO -NULL root system public replication_critical_localities SELECT YES YES -NULL root system public replication_critical_localities UPDATE YES NO -NULL admin system public replication_stats DELETE YES NO -NULL admin system public replication_stats INSERT YES NO -NULL admin system public replication_stats SELECT YES YES -NULL admin system public replication_stats UPDATE YES NO -NULL root system public replication_stats DELETE YES NO -NULL root system public replication_stats INSERT YES NO -NULL root system public replication_stats SELECT YES YES -NULL root system public replication_stats UPDATE YES NO -NULL admin system public reports_meta DELETE YES NO -NULL admin system public reports_meta INSERT YES NO -NULL admin system public reports_meta SELECT YES YES -NULL admin system public reports_meta UPDATE YES NO -NULL root system public reports_meta DELETE YES NO -NULL root system public reports_meta INSERT YES NO -NULL root system public reports_meta SELECT YES YES -NULL root system public reports_meta UPDATE YES NO -NULL admin system public namespace SELECT YES YES -NULL root system public namespace SELECT YES YES -NULL admin system public protected_ts_meta SELECT YES YES -NULL root system public protected_ts_meta SELECT YES YES -NULL admin system public protected_ts_records SELECT YES YES -NULL root system public protected_ts_records SELECT YES YES -NULL admin system public role_options DELETE YES NO -NULL admin system public role_options INSERT YES NO -NULL admin system public role_options SELECT YES YES -NULL admin system public role_options UPDATE YES NO -NULL root system public role_options DELETE YES NO -NULL root system public role_options INSERT YES NO -NULL root system public role_options SELECT YES YES -NULL root system public role_options UPDATE YES NO -NULL admin system public statement_bundle_chunks DELETE YES NO -NULL admin system public statement_bundle_chunks INSERT YES NO -NULL admin system public statement_bundle_chunks SELECT YES YES -NULL admin system public statement_bundle_chunks UPDATE YES NO -NULL root system public statement_bundle_chunks DELETE YES NO -NULL root system public statement_bundle_chunks INSERT YES NO -NULL root system public statement_bundle_chunks SELECT YES YES -NULL root system public statement_bundle_chunks UPDATE YES NO -NULL admin system public statement_diagnostics_requests DELETE YES NO -NULL admin system public statement_diagnostics_requests INSERT YES NO -NULL admin system public statement_diagnostics_requests SELECT YES YES -NULL admin system public statement_diagnostics_requests UPDATE YES NO -NULL root system public statement_diagnostics_requests DELETE YES NO -NULL root system public statement_diagnostics_requests INSERT YES NO -NULL root system public statement_diagnostics_requests SELECT YES YES -NULL root system public statement_diagnostics_requests UPDATE YES NO -NULL admin system public statement_diagnostics DELETE YES NO -NULL admin system public statement_diagnostics INSERT YES NO -NULL admin system public statement_diagnostics SELECT YES YES -NULL admin system public statement_diagnostics UPDATE YES NO -NULL root system public statement_diagnostics DELETE YES NO -NULL root system public statement_diagnostics INSERT YES NO -NULL root system public statement_diagnostics SELECT YES YES -NULL root system public statement_diagnostics UPDATE YES NO -NULL admin system public scheduled_jobs DELETE YES NO -NULL admin system public scheduled_jobs INSERT YES NO -NULL admin system public scheduled_jobs SELECT YES YES -NULL admin system public scheduled_jobs UPDATE YES NO -NULL root system public scheduled_jobs DELETE YES NO -NULL root system public scheduled_jobs INSERT YES NO -NULL root system public scheduled_jobs SELECT YES YES -NULL root system public scheduled_jobs UPDATE YES NO -NULL admin system public sqlliveness DELETE YES NO -NULL admin system public sqlliveness INSERT YES NO -NULL admin system public sqlliveness SELECT YES YES -NULL admin system public sqlliveness UPDATE YES NO -NULL root system public sqlliveness DELETE YES NO -NULL root system public sqlliveness INSERT YES NO -NULL root system public sqlliveness SELECT YES YES -NULL root system public sqlliveness UPDATE YES NO -NULL admin system public migrations DELETE YES NO -NULL admin system public migrations INSERT YES NO -NULL admin system public migrations SELECT YES YES -NULL admin system public migrations UPDATE YES NO -NULL root system public migrations DELETE YES NO -NULL root system public migrations INSERT YES NO -NULL root system public migrations SELECT YES YES -NULL root system public migrations UPDATE YES NO -NULL admin system public join_tokens DELETE YES NO -NULL admin system public join_tokens INSERT YES NO -NULL admin system public join_tokens SELECT YES YES -NULL admin system public join_tokens UPDATE YES NO -NULL root system public join_tokens DELETE YES NO -NULL root system public join_tokens INSERT YES NO -NULL root system public join_tokens SELECT YES YES -NULL root system public join_tokens UPDATE YES NO -NULL admin system public statement_statistics SELECT YES YES -NULL root system public statement_statistics SELECT YES YES -NULL admin system public transaction_statistics SELECT YES YES -NULL root system public transaction_statistics SELECT YES YES -NULL admin system public database_role_settings DELETE YES NO -NULL admin system public database_role_settings INSERT YES NO -NULL admin system public database_role_settings SELECT YES YES -NULL admin system public database_role_settings UPDATE YES NO -NULL root system public database_role_settings DELETE YES NO -NULL root system public database_role_settings INSERT YES NO -NULL root system public database_role_settings SELECT YES YES -NULL root system public database_role_settings 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 -NULL admin system public tenant_usage UPDATE YES NO -NULL root system public tenant_usage DELETE YES NO -NULL root system public tenant_usage INSERT YES NO -NULL root system public tenant_usage SELECT YES YES -NULL root system public tenant_usage UPDATE YES NO -NULL admin system public sql_instances DELETE YES NO -NULL admin system public sql_instances INSERT YES NO -NULL admin system public sql_instances SELECT YES YES -NULL admin system public sql_instances UPDATE YES NO -NULL root system public sql_instances DELETE YES NO -NULL root system public sql_instances INSERT YES NO -NULL root system public sql_instances SELECT YES YES -NULL root system public sql_instances UPDATE YES NO -NULL admin system public span_configurations DELETE YES NO -NULL admin system public span_configurations INSERT YES NO -NULL admin system public span_configurations SELECT YES YES -NULL admin system public span_configurations UPDATE YES NO -NULL root system public span_configurations DELETE YES NO -NULL root system public span_configurations INSERT YES NO -NULL root system public span_configurations SELECT YES YES -NULL root system public span_configurations UPDATE YES NO -NULL admin system public role_id_seq SELECT YES YES -NULL admin system public role_id_seq UPDATE YES NO -NULL admin system public role_id_seq USAGE YES NO -NULL root system public role_id_seq SELECT YES YES -NULL root system public role_id_seq UPDATE YES NO -NULL root system public role_id_seq USAGE 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 -NULL admin system public tenant_settings UPDATE YES NO -NULL root system public tenant_settings DELETE YES NO -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 privileges DELETE YES NO -NULL admin system public privileges INSERT YES NO -NULL admin system public privileges SELECT YES YES -NULL admin system public privileges UPDATE YES NO -NULL root system public privileges DELETE YES NO -NULL root system public privileges INSERT YES NO -NULL root system public privileges SELECT YES YES -NULL root system public privileges UPDATE YES NO -NULL admin system public external_connections DELETE YES NO -NULL admin system public external_connections INSERT YES NO -NULL admin system public external_connections SELECT YES YES -NULL admin system public external_connections UPDATE YES NO -NULL root system public external_connections DELETE YES NO -NULL root system public external_connections INSERT YES NO -NULL root system public external_connections SELECT YES YES -NULL root system public external_connections UPDATE YES NO -NULL admin system public job_info DELETE YES NO -NULL admin system public job_info INSERT YES NO -NULL admin system public job_info SELECT YES YES -NULL admin system public job_info UPDATE YES NO -NULL root system public job_info DELETE YES NO -NULL root system public job_info INSERT YES NO -NULL root system public job_info SELECT YES YES -NULL root system public job_info UPDATE YES NO -NULL admin system public span_stats_unique_keys DELETE YES NO -NULL admin system public span_stats_unique_keys INSERT YES NO -NULL admin system public span_stats_unique_keys SELECT YES YES -NULL admin system public span_stats_unique_keys UPDATE YES NO -NULL root system public span_stats_unique_keys DELETE YES NO -NULL root system public span_stats_unique_keys INSERT YES NO -NULL root system public span_stats_unique_keys SELECT YES YES -NULL root system public span_stats_unique_keys UPDATE YES NO -NULL admin system public span_stats_buckets DELETE YES NO -NULL admin system public span_stats_buckets INSERT YES NO -NULL admin system public span_stats_buckets SELECT YES YES -NULL admin system public span_stats_buckets UPDATE YES NO -NULL root system public span_stats_buckets DELETE YES NO -NULL root system public span_stats_buckets INSERT YES NO -NULL root system public span_stats_buckets SELECT YES YES -NULL root system public span_stats_buckets UPDATE YES NO -NULL admin system public span_stats_samples DELETE YES NO -NULL admin system public span_stats_samples INSERT YES NO -NULL admin system public span_stats_samples SELECT YES YES -NULL admin system public span_stats_samples UPDATE YES NO -NULL root system public span_stats_samples DELETE YES NO -NULL root system public span_stats_samples INSERT YES NO -NULL root system public span_stats_samples SELECT YES YES -NULL root system public span_stats_samples UPDATE YES NO -NULL admin system public span_stats_tenant_boundaries DELETE YES NO -NULL admin system public span_stats_tenant_boundaries INSERT YES NO -NULL admin system public span_stats_tenant_boundaries SELECT YES YES -NULL admin system public span_stats_tenant_boundaries UPDATE YES NO -NULL root system public span_stats_tenant_boundaries DELETE YES NO -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 -NULL admin system public statement_activity SELECT YES YES -NULL root system public statement_activity SELECT YES YES -NULL admin system public transaction_activity SELECT YES YES -NULL root system public transaction_activity SELECT YES YES +grantor grantee table_catalog table_schema table_name privilege_type is_grantable with_hierarchy +NULL public system crdb_internal active_range_feeds SELECT NO YES +NULL public system crdb_internal backward_dependencies SELECT NO YES +NULL public system crdb_internal builtin_functions SELECT NO YES +NULL public system crdb_internal cluster_contended_indexes SELECT NO YES +NULL public system crdb_internal cluster_contended_keys SELECT NO YES +NULL public system crdb_internal cluster_contended_tables SELECT NO YES +NULL public system crdb_internal cluster_contention_events SELECT NO YES +NULL public system crdb_internal cluster_database_privileges SELECT NO YES +NULL public system crdb_internal cluster_distsql_flows SELECT NO YES +NULL public system crdb_internal cluster_execution_insights SELECT NO YES +NULL public system crdb_internal cluster_inflight_traces SELECT NO YES +NULL public system crdb_internal cluster_locks SELECT NO YES +NULL public system crdb_internal cluster_queries SELECT NO YES +NULL public system crdb_internal cluster_sessions SELECT NO YES +NULL public system crdb_internal cluster_settings SELECT NO YES +NULL public system crdb_internal cluster_statement_statistics SELECT NO YES +NULL public system crdb_internal cluster_transaction_statistics SELECT NO YES +NULL public system crdb_internal cluster_transactions SELECT NO YES +NULL public system crdb_internal cluster_txn_execution_insights SELECT NO YES +NULL public system crdb_internal create_function_statements SELECT NO YES +NULL public system crdb_internal create_schema_statements SELECT NO YES +NULL public system crdb_internal create_statements SELECT NO YES +NULL public system crdb_internal create_type_statements SELECT NO YES +NULL public system crdb_internal cross_db_references SELECT NO YES +NULL public system crdb_internal databases SELECT NO YES +NULL public system crdb_internal default_privileges SELECT NO YES +NULL public system crdb_internal feature_usage SELECT NO YES +NULL public system crdb_internal forward_dependencies SELECT NO YES +NULL public system crdb_internal gossip_alerts SELECT NO YES +NULL public system crdb_internal gossip_liveness SELECT NO YES +NULL public system crdb_internal gossip_network SELECT NO YES +NULL public system crdb_internal gossip_nodes SELECT NO YES +NULL public system crdb_internal index_columns SELECT NO YES +NULL public system crdb_internal index_spans SELECT NO YES +NULL public system crdb_internal index_usage_statistics SELECT NO YES +NULL public system crdb_internal invalid_objects SELECT NO YES +NULL public system crdb_internal jobs SELECT NO YES +NULL public system crdb_internal kv_catalog_comments SELECT NO YES +NULL public system crdb_internal kv_catalog_descriptor SELECT NO YES +NULL public system crdb_internal kv_catalog_namespace SELECT NO YES +NULL public system crdb_internal kv_catalog_zones SELECT NO YES +NULL public system crdb_internal kv_dropped_relations SELECT NO YES +NULL public system crdb_internal kv_node_liveness SELECT NO YES +NULL public system crdb_internal kv_node_status SELECT NO YES +NULL public system crdb_internal kv_store_status SELECT NO YES +NULL public system crdb_internal leases SELECT NO YES +NULL public system crdb_internal lost_descriptors_with_data SELECT NO YES +NULL public system crdb_internal node_build_info SELECT NO YES +NULL public system crdb_internal node_contention_events SELECT NO YES +NULL public system crdb_internal node_distsql_flows SELECT NO YES +NULL public system crdb_internal node_execution_insights SELECT NO YES +NULL public system crdb_internal node_inflight_trace_spans SELECT NO YES +NULL public system crdb_internal node_memory_monitors SELECT NO YES +NULL public system crdb_internal node_metrics SELECT NO YES +NULL public system crdb_internal node_queries SELECT NO YES +NULL public system crdb_internal node_runtime_info SELECT NO YES +NULL public system crdb_internal node_sessions SELECT NO YES +NULL public system crdb_internal node_statement_statistics SELECT NO YES +NULL public system crdb_internal node_tenant_capabilities_cache SELECT NO YES +NULL public system crdb_internal node_transaction_statistics SELECT NO YES +NULL public system crdb_internal node_transactions SELECT NO YES +NULL public system crdb_internal node_txn_execution_insights SELECT NO YES +NULL public system crdb_internal node_txn_stats SELECT NO YES +NULL public system crdb_internal partitions SELECT NO YES +NULL public system crdb_internal pg_catalog_table_is_implemented SELECT NO YES +NULL public system crdb_internal ranges SELECT NO YES +NULL public system crdb_internal ranges_no_leases SELECT NO YES +NULL public system crdb_internal regions SELECT NO YES +NULL public system crdb_internal schema_changes SELECT NO YES +NULL public system crdb_internal session_trace SELECT NO YES +NULL public system crdb_internal session_variables SELECT NO YES +NULL public system crdb_internal statement_statistics SELECT NO YES +NULL public system crdb_internal statement_statistics_persisted SELECT NO YES +NULL public system crdb_internal statement_statistics_persisted_v22_2 SELECT NO YES +NULL public system crdb_internal super_regions SELECT NO YES +NULL public system crdb_internal system_jobs SELECT NO YES +NULL public system crdb_internal table_columns SELECT NO YES +NULL public system crdb_internal table_indexes SELECT NO YES +NULL public system crdb_internal table_row_statistics SELECT NO YES +NULL public system crdb_internal table_spans SELECT NO YES +NULL public system crdb_internal tables SELECT NO YES +NULL public system crdb_internal tenant_usage_details SELECT NO YES +NULL public system crdb_internal transaction_contention_events SELECT NO YES +NULL public system crdb_internal transaction_statistics SELECT NO YES +NULL public system crdb_internal transaction_statistics_persisted SELECT NO YES +NULL public system crdb_internal transaction_statistics_persisted_v22_2 SELECT NO YES +NULL public system crdb_internal zones SELECT NO YES +NULL public system information_schema administrable_role_authorizations SELECT NO YES +NULL public system information_schema applicable_roles SELECT NO YES +NULL public system information_schema attributes SELECT NO YES +NULL public system information_schema character_sets SELECT NO YES +NULL public system information_schema check_constraint_routine_usage SELECT NO YES +NULL public system information_schema check_constraints SELECT NO YES +NULL public system information_schema collation_character_set_applicability SELECT NO YES +NULL public system information_schema collations SELECT NO YES +NULL public system information_schema column_column_usage SELECT NO YES +NULL public system information_schema column_domain_usage SELECT NO YES +NULL public system information_schema column_options SELECT NO YES +NULL public system information_schema column_privileges SELECT NO YES +NULL public system information_schema column_statistics SELECT NO YES +NULL public system information_schema column_udt_usage SELECT NO YES +NULL public system information_schema columns SELECT NO YES +NULL public system information_schema columns_extensions SELECT NO YES +NULL public system information_schema constraint_column_usage SELECT NO YES +NULL public system information_schema constraint_table_usage SELECT NO YES +NULL public system information_schema data_type_privileges SELECT NO YES +NULL public system information_schema domain_constraints SELECT NO YES +NULL public system information_schema domain_udt_usage SELECT NO YES +NULL public system information_schema domains SELECT NO YES +NULL public system information_schema element_types SELECT NO YES +NULL public system information_schema enabled_roles SELECT NO YES +NULL public system information_schema engines SELECT NO YES +NULL public system information_schema events SELECT NO YES +NULL public system information_schema files SELECT NO YES +NULL public system information_schema foreign_data_wrapper_options SELECT NO YES +NULL public system information_schema foreign_data_wrappers SELECT NO YES +NULL public system information_schema foreign_server_options SELECT NO YES +NULL public system information_schema foreign_servers SELECT NO YES +NULL public system information_schema foreign_table_options SELECT NO YES +NULL public system information_schema foreign_tables SELECT NO YES +NULL public system information_schema information_schema_catalog_name SELECT NO YES +NULL public system information_schema key_column_usage SELECT NO YES +NULL public system information_schema keywords SELECT NO YES +NULL public system information_schema optimizer_trace SELECT NO YES +NULL public system information_schema parameters SELECT NO YES +NULL public system information_schema partitions SELECT NO YES +NULL public system information_schema plugins SELECT NO YES +NULL public system information_schema processlist SELECT NO YES +NULL public system information_schema profiling SELECT NO YES +NULL public system information_schema referential_constraints SELECT NO YES +NULL public system information_schema resource_groups SELECT NO YES +NULL public system information_schema role_column_grants SELECT NO YES +NULL public system information_schema role_routine_grants SELECT NO YES +NULL public system information_schema role_table_grants SELECT NO YES +NULL public system information_schema role_udt_grants SELECT NO YES +NULL public system information_schema role_usage_grants SELECT NO YES +NULL public system information_schema routine_privileges SELECT NO YES +NULL public system information_schema routines SELECT NO YES +NULL public system information_schema schema_privileges SELECT NO YES +NULL public system information_schema schemata SELECT NO YES +NULL public system information_schema schemata_extensions SELECT NO YES +NULL public system information_schema sequences SELECT NO YES +NULL public system information_schema session_variables SELECT NO YES +NULL public system information_schema sql_features SELECT NO YES +NULL public system information_schema sql_implementation_info SELECT NO YES +NULL public system information_schema sql_parts SELECT NO YES +NULL public system information_schema sql_sizing SELECT NO YES +NULL public system information_schema st_geometry_columns SELECT NO YES +NULL public system information_schema st_spatial_reference_systems SELECT NO YES +NULL public system information_schema st_units_of_measure SELECT NO YES +NULL public system information_schema statistics SELECT NO YES +NULL public system information_schema table_constraints SELECT NO YES +NULL public system information_schema table_constraints_extensions SELECT NO YES +NULL public system information_schema table_privileges SELECT NO YES +NULL public system information_schema tables SELECT NO YES +NULL public system information_schema tables_extensions SELECT NO YES +NULL public system information_schema tablespaces SELECT NO YES +NULL public system information_schema tablespaces_extensions SELECT NO YES +NULL public system information_schema transforms SELECT NO YES +NULL public system information_schema triggered_update_columns SELECT NO YES +NULL public system information_schema triggers SELECT NO YES +NULL public system information_schema type_privileges SELECT NO YES +NULL public system information_schema udt_privileges SELECT NO YES +NULL public system information_schema usage_privileges SELECT NO YES +NULL public system information_schema user_attributes SELECT NO YES +NULL public system information_schema user_defined_types SELECT NO YES +NULL public system information_schema user_mapping_options SELECT NO YES +NULL public system information_schema user_mappings SELECT NO YES +NULL public system information_schema user_privileges SELECT NO YES +NULL public system information_schema view_column_usage SELECT NO YES +NULL public system information_schema view_routine_usage SELECT NO YES +NULL public system information_schema view_table_usage SELECT NO YES +NULL public system information_schema views SELECT NO YES +NULL public system pg_catalog pg_aggregate SELECT NO YES +NULL public system pg_catalog pg_am SELECT NO YES +NULL public system pg_catalog pg_amop SELECT NO YES +NULL public system pg_catalog pg_amproc SELECT NO YES +NULL public system pg_catalog pg_attrdef SELECT NO YES +NULL public system pg_catalog pg_attribute SELECT NO YES +NULL public system pg_catalog pg_auth_members SELECT NO YES +NULL public system pg_catalog pg_authid SELECT NO YES +NULL public system pg_catalog pg_available_extension_versions SELECT NO YES +NULL public system pg_catalog pg_available_extensions SELECT NO YES +NULL public system pg_catalog pg_cast SELECT NO YES +NULL public system pg_catalog pg_class SELECT NO YES +NULL public system pg_catalog pg_collation SELECT NO YES +NULL public system pg_catalog pg_config SELECT NO YES +NULL public system pg_catalog pg_constraint SELECT NO YES +NULL public system pg_catalog pg_conversion SELECT NO YES +NULL public system pg_catalog pg_cursors SELECT NO YES +NULL public system pg_catalog pg_database SELECT NO YES +NULL public system pg_catalog pg_db_role_setting SELECT NO YES +NULL public system pg_catalog pg_default_acl SELECT NO YES +NULL public system pg_catalog pg_depend SELECT NO YES +NULL public system pg_catalog pg_description SELECT NO YES +NULL public system pg_catalog pg_enum SELECT NO YES +NULL public system pg_catalog pg_event_trigger SELECT NO YES +NULL public system pg_catalog pg_extension SELECT NO YES +NULL public system pg_catalog pg_file_settings SELECT NO YES +NULL public system pg_catalog pg_foreign_data_wrapper SELECT NO YES +NULL public system pg_catalog pg_foreign_server SELECT NO YES +NULL public system pg_catalog pg_foreign_table SELECT NO YES +NULL public system pg_catalog pg_group SELECT NO YES +NULL public system pg_catalog pg_hba_file_rules SELECT NO YES +NULL public system pg_catalog pg_index SELECT NO YES +NULL public system pg_catalog pg_indexes SELECT NO YES +NULL public system pg_catalog pg_inherits SELECT NO YES +NULL public system pg_catalog pg_init_privs SELECT NO YES +NULL public system pg_catalog pg_language SELECT NO YES +NULL public system pg_catalog pg_largeobject SELECT NO YES +NULL public system pg_catalog pg_largeobject_metadata SELECT NO YES +NULL public system pg_catalog pg_locks SELECT NO YES +NULL public system pg_catalog pg_matviews SELECT NO YES +NULL public system pg_catalog pg_namespace SELECT NO YES +NULL public system pg_catalog pg_opclass SELECT NO YES +NULL public system pg_catalog pg_operator SELECT NO YES +NULL public system pg_catalog pg_opfamily SELECT NO YES +NULL public system pg_catalog pg_partitioned_table SELECT NO YES +NULL public system pg_catalog pg_policies SELECT NO YES +NULL public system pg_catalog pg_policy SELECT NO YES +NULL public system pg_catalog pg_prepared_statements SELECT NO YES +NULL public system pg_catalog pg_prepared_xacts SELECT NO YES +NULL public system pg_catalog pg_proc SELECT NO YES +NULL public system pg_catalog pg_publication SELECT NO YES +NULL public system pg_catalog pg_publication_rel SELECT NO YES +NULL public system pg_catalog pg_publication_tables SELECT NO YES +NULL public system pg_catalog pg_range SELECT NO YES +NULL public system pg_catalog pg_replication_origin SELECT NO YES +NULL public system pg_catalog pg_replication_origin_status SELECT NO YES +NULL public system pg_catalog pg_replication_slots SELECT NO YES +NULL public system pg_catalog pg_rewrite SELECT NO YES +NULL public system pg_catalog pg_roles SELECT NO YES +NULL public system pg_catalog pg_rules SELECT NO YES +NULL public system pg_catalog pg_seclabel SELECT NO YES +NULL public system pg_catalog pg_seclabels SELECT NO YES +NULL public system pg_catalog pg_sequence SELECT NO YES +NULL public system pg_catalog pg_sequences SELECT NO YES +NULL public system pg_catalog pg_settings SELECT NO YES +NULL public system pg_catalog pg_shadow SELECT NO YES +NULL public system pg_catalog pg_shdepend SELECT NO YES +NULL public system pg_catalog pg_shdescription SELECT NO YES +NULL public system pg_catalog pg_shmem_allocations SELECT NO YES +NULL public system pg_catalog pg_shseclabel SELECT NO YES +NULL public system pg_catalog pg_stat_activity SELECT NO YES +NULL public system pg_catalog pg_stat_all_indexes SELECT NO YES +NULL public system pg_catalog pg_stat_all_tables SELECT NO YES +NULL public system pg_catalog pg_stat_archiver SELECT NO YES +NULL public system pg_catalog pg_stat_bgwriter SELECT NO YES +NULL public system pg_catalog pg_stat_database SELECT NO YES +NULL public system pg_catalog pg_stat_database_conflicts SELECT NO YES +NULL public system pg_catalog pg_stat_gssapi SELECT NO YES +NULL public system pg_catalog pg_stat_progress_analyze SELECT NO YES +NULL public system pg_catalog pg_stat_progress_basebackup SELECT NO YES +NULL public system pg_catalog pg_stat_progress_cluster SELECT NO YES +NULL public system pg_catalog pg_stat_progress_create_index SELECT NO YES +NULL public system pg_catalog pg_stat_progress_vacuum SELECT NO YES +NULL public system pg_catalog pg_stat_replication SELECT NO YES +NULL public system pg_catalog pg_stat_slru SELECT NO YES +NULL public system pg_catalog pg_stat_ssl SELECT NO YES +NULL public system pg_catalog pg_stat_subscription SELECT NO YES +NULL public system pg_catalog pg_stat_sys_indexes SELECT NO YES +NULL public system pg_catalog pg_stat_sys_tables SELECT NO YES +NULL public system pg_catalog pg_stat_user_functions SELECT NO YES +NULL public system pg_catalog pg_stat_user_indexes SELECT NO YES +NULL public system pg_catalog pg_stat_user_tables SELECT NO YES +NULL public system pg_catalog pg_stat_wal_receiver SELECT NO YES +NULL public system pg_catalog pg_stat_xact_all_tables SELECT NO YES +NULL public system pg_catalog pg_stat_xact_sys_tables SELECT NO YES +NULL public system pg_catalog pg_stat_xact_user_functions SELECT NO YES +NULL public system pg_catalog pg_stat_xact_user_tables SELECT NO YES +NULL public system pg_catalog pg_statio_all_indexes SELECT NO YES +NULL public system pg_catalog pg_statio_all_sequences SELECT NO YES +NULL public system pg_catalog pg_statio_all_tables SELECT NO YES +NULL public system pg_catalog pg_statio_sys_indexes SELECT NO YES +NULL public system pg_catalog pg_statio_sys_sequences SELECT NO YES +NULL public system pg_catalog pg_statio_sys_tables SELECT NO YES +NULL public system pg_catalog pg_statio_user_indexes SELECT NO YES +NULL public system pg_catalog pg_statio_user_sequences SELECT NO YES +NULL public system pg_catalog pg_statio_user_tables SELECT NO YES +NULL public system pg_catalog pg_statistic SELECT NO YES +NULL public system pg_catalog pg_statistic_ext SELECT NO YES +NULL public system pg_catalog pg_statistic_ext_data SELECT NO YES +NULL public system pg_catalog pg_stats SELECT NO YES +NULL public system pg_catalog pg_stats_ext SELECT NO YES +NULL public system pg_catalog pg_subscription SELECT NO YES +NULL public system pg_catalog pg_subscription_rel SELECT NO YES +NULL public system pg_catalog pg_tables SELECT NO YES +NULL public system pg_catalog pg_tablespace SELECT NO YES +NULL public system pg_catalog pg_timezone_abbrevs SELECT NO YES +NULL public system pg_catalog pg_timezone_names SELECT NO YES +NULL public system pg_catalog pg_transform SELECT NO YES +NULL public system pg_catalog pg_trigger SELECT NO YES +NULL public system pg_catalog pg_ts_config SELECT NO YES +NULL public system pg_catalog pg_ts_config_map SELECT NO YES +NULL public system pg_catalog pg_ts_dict SELECT NO YES +NULL public system pg_catalog pg_ts_parser SELECT NO YES +NULL public system pg_catalog pg_ts_template SELECT NO YES +NULL public system pg_catalog pg_type SELECT NO YES +NULL public system pg_catalog pg_user SELECT NO YES +NULL public system pg_catalog pg_user_mapping SELECT NO YES +NULL public system pg_catalog pg_user_mappings SELECT NO YES +NULL public system pg_catalog pg_views SELECT NO YES +NULL public system pg_extension geography_columns SELECT NO YES +NULL public system pg_extension geometry_columns SELECT NO YES +NULL public system pg_extension spatial_ref_sys SELECT NO YES +NULL admin system public descriptor SELECT YES YES +NULL root system public descriptor SELECT YES YES +NULL admin system public users DELETE YES NO +NULL admin system public users INSERT YES NO +NULL admin system public users SELECT YES YES +NULL admin system public users UPDATE YES NO +NULL root system public users DELETE YES NO +NULL root system public users INSERT YES NO +NULL root system public users SELECT YES YES +NULL root system public users UPDATE YES NO +NULL admin system public zones DELETE YES NO +NULL admin system public zones INSERT YES NO +NULL admin system public zones SELECT YES YES +NULL admin system public zones UPDATE YES NO +NULL root system public zones DELETE YES NO +NULL root system public zones INSERT YES NO +NULL root system public zones SELECT YES YES +NULL root system public zones UPDATE YES NO +NULL admin system public settings DELETE YES NO +NULL admin system public settings INSERT YES NO +NULL admin system public settings SELECT YES YES +NULL admin system public settings UPDATE YES NO +NULL root system public settings DELETE YES NO +NULL root system public settings INSERT YES NO +NULL root system public settings SELECT YES YES +NULL root system public settings UPDATE YES NO +NULL admin system public descriptor_id_seq SELECT YES YES +NULL root system public descriptor_id_seq SELECT YES YES +NULL admin system public tenants SELECT YES YES +NULL root system public tenants SELECT YES YES +NULL admin system public lease DELETE YES NO +NULL admin system public lease INSERT YES NO +NULL admin system public lease SELECT YES YES +NULL admin system public lease UPDATE YES NO +NULL root system public lease DELETE YES NO +NULL root system public lease INSERT YES NO +NULL root system public lease SELECT YES YES +NULL root system public lease UPDATE YES NO +NULL admin system public eventlog DELETE YES NO +NULL admin system public eventlog INSERT YES NO +NULL admin system public eventlog SELECT YES YES +NULL admin system public eventlog UPDATE YES NO +NULL root system public eventlog DELETE YES NO +NULL root system public eventlog INSERT YES NO +NULL root system public eventlog SELECT YES YES +NULL root system public eventlog UPDATE YES NO +NULL admin system public rangelog DELETE YES NO +NULL admin system public rangelog INSERT YES NO +NULL admin system public rangelog SELECT YES YES +NULL admin system public rangelog UPDATE YES NO +NULL root system public rangelog DELETE YES NO +NULL root system public rangelog INSERT YES NO +NULL root system public rangelog SELECT YES YES +NULL root system public rangelog UPDATE YES NO +NULL admin system public ui DELETE YES NO +NULL admin system public ui INSERT YES NO +NULL admin system public ui SELECT YES YES +NULL admin system public ui UPDATE YES NO +NULL root system public ui DELETE YES NO +NULL root system public ui INSERT YES NO +NULL root system public ui SELECT YES YES +NULL root system public ui UPDATE YES NO +NULL admin system public jobs DELETE YES NO +NULL admin system public jobs INSERT YES NO +NULL admin system public jobs SELECT YES YES +NULL admin system public jobs UPDATE YES NO +NULL root system public jobs DELETE YES NO +NULL root system public jobs INSERT YES NO +NULL root system public jobs SELECT YES YES +NULL root system public jobs UPDATE YES NO +NULL admin system public web_sessions DELETE YES NO +NULL admin system public web_sessions INSERT YES NO +NULL admin system public web_sessions SELECT YES YES +NULL admin system public web_sessions UPDATE YES NO +NULL root system public web_sessions DELETE YES NO +NULL root system public web_sessions INSERT YES NO +NULL root system public web_sessions SELECT YES YES +NULL root system public web_sessions UPDATE YES NO +NULL admin system public table_statistics DELETE YES NO +NULL admin system public table_statistics INSERT YES NO +NULL admin system public table_statistics SELECT YES YES +NULL admin system public table_statistics UPDATE YES NO +NULL root system public table_statistics DELETE YES NO +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 locations DELETE YES NO +NULL admin system public locations INSERT YES NO +NULL admin system public locations SELECT YES YES +NULL admin system public locations UPDATE YES NO +NULL root system public locations DELETE YES NO +NULL root system public locations INSERT YES NO +NULL root system public locations SELECT YES YES +NULL root system public locations UPDATE YES NO +NULL admin system public role_members DELETE YES NO +NULL admin system public role_members INSERT YES NO +NULL admin system public role_members SELECT YES YES +NULL admin system public role_members UPDATE YES NO +NULL root system public role_members DELETE YES NO +NULL root system public role_members INSERT YES NO +NULL root system public role_members SELECT YES YES +NULL root system public role_members UPDATE YES NO +NULL admin system public comments DELETE YES NO +NULL admin system public comments INSERT YES NO +NULL admin system public comments SELECT YES YES +NULL admin system public comments UPDATE YES NO +NULL public system public comments SELECT NO YES +NULL root system public comments DELETE YES NO +NULL root system public comments INSERT YES NO +NULL root system public comments SELECT YES YES +NULL root system public comments UPDATE YES NO +NULL admin system public replication_constraint_stats DELETE YES NO +NULL admin system public replication_constraint_stats INSERT YES NO +NULL admin system public replication_constraint_stats SELECT YES YES +NULL admin system public replication_constraint_stats UPDATE YES NO +NULL root system public replication_constraint_stats DELETE YES NO +NULL root system public replication_constraint_stats INSERT YES NO +NULL root system public replication_constraint_stats SELECT YES YES +NULL root system public replication_constraint_stats UPDATE YES NO +NULL admin system public replication_critical_localities DELETE YES NO +NULL admin system public replication_critical_localities INSERT YES NO +NULL admin system public replication_critical_localities SELECT YES YES +NULL admin system public replication_critical_localities UPDATE YES NO +NULL root system public replication_critical_localities DELETE YES NO +NULL root system public replication_critical_localities INSERT YES NO +NULL root system public replication_critical_localities SELECT YES YES +NULL root system public replication_critical_localities UPDATE YES NO +NULL admin system public replication_stats DELETE YES NO +NULL admin system public replication_stats INSERT YES NO +NULL admin system public replication_stats SELECT YES YES +NULL admin system public replication_stats UPDATE YES NO +NULL root system public replication_stats DELETE YES NO +NULL root system public replication_stats INSERT YES NO +NULL root system public replication_stats SELECT YES YES +NULL root system public replication_stats UPDATE YES NO +NULL admin system public reports_meta DELETE YES NO +NULL admin system public reports_meta INSERT YES NO +NULL admin system public reports_meta SELECT YES YES +NULL admin system public reports_meta UPDATE YES NO +NULL root system public reports_meta DELETE YES NO +NULL root system public reports_meta INSERT YES NO +NULL root system public reports_meta SELECT YES YES +NULL root system public reports_meta UPDATE YES NO +NULL admin system public namespace SELECT YES YES +NULL root system public namespace SELECT YES YES +NULL admin system public protected_ts_meta SELECT YES YES +NULL root system public protected_ts_meta SELECT YES YES +NULL admin system public protected_ts_records SELECT YES YES +NULL root system public protected_ts_records SELECT YES YES +NULL admin system public role_options DELETE YES NO +NULL admin system public role_options INSERT YES NO +NULL admin system public role_options SELECT YES YES +NULL admin system public role_options UPDATE YES NO +NULL root system public role_options DELETE YES NO +NULL root system public role_options INSERT YES NO +NULL root system public role_options SELECT YES YES +NULL root system public role_options UPDATE YES NO +NULL admin system public statement_bundle_chunks DELETE YES NO +NULL admin system public statement_bundle_chunks INSERT YES NO +NULL admin system public statement_bundle_chunks SELECT YES YES +NULL admin system public statement_bundle_chunks UPDATE YES NO +NULL root system public statement_bundle_chunks DELETE YES NO +NULL root system public statement_bundle_chunks INSERT YES NO +NULL root system public statement_bundle_chunks SELECT YES YES +NULL root system public statement_bundle_chunks UPDATE YES NO +NULL admin system public statement_diagnostics_requests DELETE YES NO +NULL admin system public statement_diagnostics_requests INSERT YES NO +NULL admin system public statement_diagnostics_requests SELECT YES YES +NULL admin system public statement_diagnostics_requests UPDATE YES NO +NULL root system public statement_diagnostics_requests DELETE YES NO +NULL root system public statement_diagnostics_requests INSERT YES NO +NULL root system public statement_diagnostics_requests SELECT YES YES +NULL root system public statement_diagnostics_requests UPDATE YES NO +NULL admin system public statement_diagnostics DELETE YES NO +NULL admin system public statement_diagnostics INSERT YES NO +NULL admin system public statement_diagnostics SELECT YES YES +NULL admin system public statement_diagnostics UPDATE YES NO +NULL root system public statement_diagnostics DELETE YES NO +NULL root system public statement_diagnostics INSERT YES NO +NULL root system public statement_diagnostics SELECT YES YES +NULL root system public statement_diagnostics UPDATE YES NO +NULL admin system public scheduled_jobs DELETE YES NO +NULL admin system public scheduled_jobs INSERT YES NO +NULL admin system public scheduled_jobs SELECT YES YES +NULL admin system public scheduled_jobs UPDATE YES NO +NULL root system public scheduled_jobs DELETE YES NO +NULL root system public scheduled_jobs INSERT YES NO +NULL root system public scheduled_jobs SELECT YES YES +NULL root system public scheduled_jobs UPDATE YES NO +NULL admin system public sqlliveness DELETE YES NO +NULL admin system public sqlliveness INSERT YES NO +NULL admin system public sqlliveness SELECT YES YES +NULL admin system public sqlliveness UPDATE YES NO +NULL root system public sqlliveness DELETE YES NO +NULL root system public sqlliveness INSERT YES NO +NULL root system public sqlliveness SELECT YES YES +NULL root system public sqlliveness UPDATE YES NO +NULL admin system public migrations DELETE YES NO +NULL admin system public migrations INSERT YES NO +NULL admin system public migrations SELECT YES YES +NULL admin system public migrations UPDATE YES NO +NULL root system public migrations DELETE YES NO +NULL root system public migrations INSERT YES NO +NULL root system public migrations SELECT YES YES +NULL root system public migrations UPDATE YES NO +NULL admin system public join_tokens DELETE YES NO +NULL admin system public join_tokens INSERT YES NO +NULL admin system public join_tokens SELECT YES YES +NULL admin system public join_tokens UPDATE YES NO +NULL root system public join_tokens DELETE YES NO +NULL root system public join_tokens INSERT YES NO +NULL root system public join_tokens SELECT YES YES +NULL root system public join_tokens UPDATE YES NO +NULL admin system public statement_statistics SELECT YES YES +NULL root system public statement_statistics SELECT YES YES +NULL admin system public transaction_statistics SELECT YES YES +NULL root system public transaction_statistics SELECT YES YES +NULL admin system public database_role_settings DELETE YES NO +NULL admin system public database_role_settings INSERT YES NO +NULL admin system public database_role_settings SELECT YES YES +NULL admin system public database_role_settings UPDATE YES NO +NULL root system public database_role_settings DELETE YES NO +NULL root system public database_role_settings INSERT YES NO +NULL root system public database_role_settings SELECT YES YES +NULL root system public database_role_settings 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 +NULL admin system public tenant_usage UPDATE YES NO +NULL root system public tenant_usage DELETE YES NO +NULL root system public tenant_usage INSERT YES NO +NULL root system public tenant_usage SELECT YES YES +NULL root system public tenant_usage UPDATE YES NO +NULL admin system public sql_instances DELETE YES NO +NULL admin system public sql_instances INSERT YES NO +NULL admin system public sql_instances SELECT YES YES +NULL admin system public sql_instances UPDATE YES NO +NULL root system public sql_instances DELETE YES NO +NULL root system public sql_instances INSERT YES NO +NULL root system public sql_instances SELECT YES YES +NULL root system public sql_instances UPDATE YES NO +NULL admin system public span_configurations DELETE YES NO +NULL admin system public span_configurations INSERT YES NO +NULL admin system public span_configurations SELECT YES YES +NULL admin system public span_configurations UPDATE YES NO +NULL root system public span_configurations DELETE YES NO +NULL root system public span_configurations INSERT YES NO +NULL root system public span_configurations SELECT YES YES +NULL root system public span_configurations UPDATE YES NO +NULL admin system public role_id_seq SELECT YES YES +NULL admin system public role_id_seq UPDATE YES NO +NULL admin system public role_id_seq USAGE YES NO +NULL root system public role_id_seq SELECT YES YES +NULL root system public role_id_seq UPDATE YES NO +NULL root system public role_id_seq USAGE 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 +NULL admin system public tenant_settings UPDATE YES NO +NULL root system public tenant_settings DELETE YES NO +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 privileges DELETE YES NO +NULL admin system public privileges INSERT YES NO +NULL admin system public privileges SELECT YES YES +NULL admin system public privileges UPDATE YES NO +NULL root system public privileges DELETE YES NO +NULL root system public privileges INSERT YES NO +NULL root system public privileges SELECT YES YES +NULL root system public privileges UPDATE YES NO +NULL admin system public external_connections DELETE YES NO +NULL admin system public external_connections INSERT YES NO +NULL admin system public external_connections SELECT YES YES +NULL admin system public external_connections UPDATE YES NO +NULL root system public external_connections DELETE YES NO +NULL root system public external_connections INSERT YES NO +NULL root system public external_connections SELECT YES YES +NULL root system public external_connections UPDATE YES NO +NULL admin system public job_info DELETE YES NO +NULL admin system public job_info INSERT YES NO +NULL admin system public job_info SELECT YES YES +NULL admin system public job_info UPDATE YES NO +NULL root system public job_info DELETE YES NO +NULL root system public job_info INSERT YES NO +NULL root system public job_info SELECT YES YES +NULL root system public job_info UPDATE YES NO +NULL admin system public span_stats_unique_keys DELETE YES NO +NULL admin system public span_stats_unique_keys INSERT YES NO +NULL admin system public span_stats_unique_keys SELECT YES YES +NULL admin system public span_stats_unique_keys UPDATE YES NO +NULL root system public span_stats_unique_keys DELETE YES NO +NULL root system public span_stats_unique_keys INSERT YES NO +NULL root system public span_stats_unique_keys SELECT YES YES +NULL root system public span_stats_unique_keys UPDATE YES NO +NULL admin system public span_stats_buckets DELETE YES NO +NULL admin system public span_stats_buckets INSERT YES NO +NULL admin system public span_stats_buckets SELECT YES YES +NULL admin system public span_stats_buckets UPDATE YES NO +NULL root system public span_stats_buckets DELETE YES NO +NULL root system public span_stats_buckets INSERT YES NO +NULL root system public span_stats_buckets SELECT YES YES +NULL root system public span_stats_buckets UPDATE YES NO +NULL admin system public span_stats_samples DELETE YES NO +NULL admin system public span_stats_samples INSERT YES NO +NULL admin system public span_stats_samples SELECT YES YES +NULL admin system public span_stats_samples UPDATE YES NO +NULL root system public span_stats_samples DELETE YES NO +NULL root system public span_stats_samples INSERT YES NO +NULL root system public span_stats_samples SELECT YES YES +NULL root system public span_stats_samples UPDATE YES NO +NULL admin system public span_stats_tenant_boundaries DELETE YES NO +NULL admin system public span_stats_tenant_boundaries INSERT YES NO +NULL admin system public span_stats_tenant_boundaries SELECT YES YES +NULL admin system public span_stats_tenant_boundaries UPDATE YES NO +NULL root system public span_stats_tenant_boundaries DELETE YES NO +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 +NULL admin system public statement_activity SELECT YES YES +NULL root system public statement_activity SELECT YES YES +NULL admin system public transaction_activity SELECT YES YES +NULL root system public transaction_activity SELECT YES YES +NULL admin system public tenant_id_seq SELECT YES YES +NULL root system public tenant_id_seq SELECT YES YES 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 6540da77f711..2d913f067347 100644 --- a/pkg/sql/logictest/testdata/logic_test/inverted_filter_geospatial_dist +++ b/pkg/sql/logictest/testdata/logic_test/inverted_filter_geospatial_dist @@ -63,7 +63,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM INDEX g ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1152921574000000000 {1} 1 + …/1152921574000000000 {1} 1 …/1152921574000000000 {2} 2 # Distributed. @@ -92,7 +92,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM INDEX g 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 87e0fe2184bb..486378403e44 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/merge_join_dist b/pkg/sql/logictest/testdata/logic_test/merge_join_dist index 19945129cb10..9bef13f747a8 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 776e50b2b397..976ed4a2fc21 100644 --- a/pkg/sql/logictest/testdata/logic_test/pg_catalog +++ b/pkg/sql/logictest/testdata/logic_test/pg_catalog @@ -1203,6 +1203,7 @@ indexrelid indrelid indnatts indisunique indnullsnotdistinct indisprimary 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 +3919862786 62 1 false false true false false false true false false true false 1 0 0 2 NULL NULL 1 3966258450 14 1 true false true false true false true false false true false 1 3403232968 0 2 NULL NULL 1 4012654114 30 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 4133203393 45 2 true false true false true false true false false true false 1 2 0 0 0 0 2 2 NULL NULL 2 @@ -1400,6 +1401,7 @@ indexrelid operator_argument_type_oid operator_argument_position 3752917847 0 2 3873467121 0 1 3873467121 0 2 +3919862786 0 1 3966258450 0 1 4012654114 0 1 4012654114 0 2 diff --git a/pkg/sql/logictest/testdata/logic_test/ranges b/pkg/sql/logictest/testdata/logic_test/ranges index e6cc6a0a7652..991d0b11f6f6 100644 --- a/pkg/sql/logictest/testdata/logic_test/ranges +++ b/pkg/sql/logictest/testdata/logic_test/ranges @@ -14,7 +14,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t ORDER BY 1 ---- start_key end_key replicas lease_holder - {1} 1 + {1} 1 statement ok ALTER TABLE t SPLIT AT VALUES (1), (10) @@ -24,7 +24,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t 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 @@ -39,7 +39,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t 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 @@ -51,7 +51,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t 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/10 {1} 1 …/1/5/1 …/1/5/2 {4} 4 @@ -72,7 +72,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t 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/10 {1} 1 …/1/5/1 …/1/5/2 {1,2,3} 1 @@ -224,7 +224,8 @@ c1 /Table/57 c2 /Table/ c2 /Table/58 c3 /Table/59 {1} 1 c3 /Table/59 c4 /Table/60 {1} 1 c4 /Table/60 c5 /Table/61 {1} 1 -c5 /Table/61 f28989 /Table/106/1/1 {1} 1 +c5 /Table/61 c6 /Table/62 {1} 1 +c6 /Table/62 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 @@ -305,7 +306,8 @@ c1 /Table/57 c2 /Table/ c2 /Table/58 c3 /Table/59 {1} 1 c3 /Table/59 c4 /Table/60 {1} 1 c4 /Table/60 c5 /Table/61 {1} 1 -c5 /Table/61 f28989 /Table/106/1/1 {1} 1 +c5 /Table/61 c6 /Table/62 {1} 1 +c6 /Table/62 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 e02d07370102..f0c4fa4e35c3 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/61 /Table/106/1/10 62 NULL -/Table/106/1/10 /Table/106/2/20 63 2262-04-11 23:47:16.854776 +0000 +0000 -/Table/106/2/20 /Table/106/2/30 64 2262-04-11 23:47:16.854776 +0000 +0000 -/Table/106/2/30 /Table/107/1/42 65 2262-04-11 23:47:16.854776 +0000 +0000 -/Table/107/1/42 /Max 66 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/62 /Table/106/1/10 63 NULL +/Table/106/1/10 /Table/106/2/20 64 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/106/2/20 /Table/106/2/30 65 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/106/2/30 /Table/107/1/42 66 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/107/1/42 /Max 67 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/61 /Table/106/1/10 62 1 NULL -/Table/106/1/10 /Table/106/2/20 63 1 2262-04-11 23:47:16.854776 +0000 +0000 -/Table/106/2/20 /Table/106/2/30 64 1 2262-04-11 23:47:16.854776 +0000 +0000 -/Table/106/2/30 /Table/107/1/42 65 1 2262-04-11 23:47:16.854776 +0000 +0000 -/Table/107/1/42 /Max 66 1 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/62 /Table/106/1/10 63 1 NULL +/Table/106/1/10 /Table/106/2/20 64 1 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/106/2/20 /Table/106/2/30 65 1 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/106/2/30 /Table/107/1/42 66 1 2262-04-11 23:47:16.854776 +0000 +0000 +/Table/107/1/42 /Max 67 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/61 /Table/106/1/10 62 test public t 106 t_pkey 1 /Table/106/1 /Table/106/2 -/Table/106/1/10 /Table/106/2/20 63 test public t 106 t_pkey 1 /Table/106/1 /Table/106/2 -/Table/106/1/10 /Table/106/2/20 63 test public t 106 idx 2 /Table/106/2 /Table/106/3 -/Table/106/2/20 /Table/106/2/30 64 test public t 106 idx 2 /Table/106/2 /Table/106/3 -/Table/106/2/30 /Table/107/1/42 65 test public t 106 idx 2 /Table/106/2 /Table/106/3 -/Table/106/2/30 /Table/107/1/42 65 test public u 107 u_pkey 1 /Table/107/1 /Table/107/2 -/Table/107/1/42 /Max 66 test public u 107 u_pkey 1 /Table/107/1 /Table/107/2 +/Table/62 /Table/106/1/10 63 test public t 106 t_pkey 1 /Table/106/1 /Table/106/2 +/Table/106/1/10 /Table/106/2/20 64 test public t 106 t_pkey 1 /Table/106/1 /Table/106/2 +/Table/106/1/10 /Table/106/2/20 64 test public t 106 idx 2 /Table/106/2 /Table/106/3 +/Table/106/2/20 /Table/106/2/30 65 test public t 106 idx 2 /Table/106/2 /Table/106/3 +/Table/106/2/30 /Table/107/1/42 66 test public t 106 idx 2 /Table/106/2 /Table/106/3 +/Table/106/2/30 /Table/107/1/42 66 test public u 107 u_pkey 1 /Table/107/1 /Table/107/2 +/Table/107/1/42 /Max 67 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/61 /Table/106/1/10 62 public t 106 /Table/106 /Table/107 -/Table/106/1/10 /Table/106/2/20 63 public t 106 /Table/106 /Table/107 -/Table/106/2/20 /Table/106/2/30 64 public t 106 /Table/106 /Table/107 -/Table/106/2/30 /Table/107/1/42 65 public t 106 /Table/106 /Table/107 -/Table/106/2/30 /Table/107/1/42 65 public u 107 /Table/107 /Table/108 -/Table/107/1/42 /Max 66 public u 107 /Table/107 /Table/108 +/Table/62 /Table/106/1/10 63 public t 106 /Table/106 /Table/107 +/Table/106/1/10 /Table/106/2/20 64 public t 106 /Table/106 /Table/107 +/Table/106/2/20 /Table/106/2/30 65 public t 106 /Table/106 /Table/107 +/Table/106/2/30 /Table/107/1/42 66 public t 106 /Table/106 /Table/107 +/Table/106/2/30 /Table/107/1/42 66 public u 107 /Table/107 /Table/108 +/Table/107/1/42 /Max 67 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/61 /Table/106/1/10 62 public t 106 t_pkey 1 /Table/106/1 /Table/106/2 -/Table/106/1/10 /Table/106/2/20 63 public t 106 t_pkey 1 /Table/106/1 /Table/106/2 -/Table/106/1/10 /Table/106/2/20 63 public t 106 idx 2 /Table/106/2 /Table/106/3 -/Table/106/2/20 /Table/106/2/30 64 public t 106 idx 2 /Table/106/2 /Table/106/3 -/Table/106/2/30 /Table/107/1/42 65 public t 106 idx 2 /Table/106/2 /Table/106/3 -/Table/106/2/30 /Table/107/1/42 65 public u 107 u_pkey 1 /Table/107/1 /Table/107/2 -/Table/107/1/42 /Max 66 public u 107 u_pkey 1 /Table/107/1 /Table/107/2 +/Table/62 /Table/106/1/10 63 public t 106 t_pkey 1 /Table/106/1 /Table/106/2 +/Table/106/1/10 /Table/106/2/20 64 public t 106 t_pkey 1 /Table/106/1 /Table/106/2 +/Table/106/1/10 /Table/106/2/20 64 public t 106 idx 2 /Table/106/2 /Table/106/3 +/Table/106/2/20 /Table/106/2/30 65 public t 106 idx 2 /Table/106/2 /Table/106/3 +/Table/106/2/30 /Table/107/1/42 66 public t 106 idx 2 /Table/106/2 /Table/106/3 +/Table/106/2/30 /Table/107/1/42 66 public u 107 u_pkey 1 /Table/107/1 /Table/107/2 +/Table/107/1/42 /Max 67 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 62 NULL -…/1/10 …/2/20 63 2262-04-11 23:47:16.854776 +0000 +0000 -…/2/20 …/2/30 64 2262-04-11 23:47:16.854776 +0000 +0000 -…/2/30 65 2262-04-11 23:47:16.854776 +0000 +0000 + …/1/10 63 NULL +…/1/10 …/2/20 64 2262-04-11 23:47:16.854776 +0000 +0000 +…/2/20 …/2/30 65 2262-04-11 23:47:16.854776 +0000 +0000 +…/2/30 66 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 62 1 NULL -…/1/10 …/2/20 63 1 2262-04-11 23:47:16.854776 +0000 +0000 -…/2/20 …/2/30 64 1 2262-04-11 23:47:16.854776 +0000 +0000 -…/2/30 65 1 2262-04-11 23:47:16.854776 +0000 +0000 + …/1/10 63 1 NULL +…/1/10 …/2/20 64 1 2262-04-11 23:47:16.854776 +0000 +0000 +…/2/20 …/2/30 65 1 2262-04-11 23:47:16.854776 +0000 +0000 +…/2/30 66 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 65 2262-04-11 23:47:16.854776 +0000 +0000 -…/1/42 66 2262-04-11 23:47:16.854776 +0000 +0000 + …/1/42 66 2262-04-11 23:47:16.854776 +0000 +0000 +…/1/42 67 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 62 t_pkey 1 …/1 …/2 -…/1/10 …/2/20 63 t_pkey 1 …/1 …/2 -…/1/10 …/2/20 63 idx 2 …/2 …/3 -…/2/20 …/2/30 64 idx 2 …/2 …/3 -…/2/30 65 idx 2 …/2 …/3 + …/1/10 63 t_pkey 1 …/1 …/2 +…/1/10 …/2/20 64 t_pkey 1 …/1 …/2 +…/1/10 …/2/20 64 idx 2 …/2 …/3 +…/2/20 …/2/30 65 idx 2 …/2 …/3 +…/2/30 66 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 63 2262-04-11 23:47:16.854776 +0000 +0000 -…/20 …/30 64 2262-04-11 23:47:16.854776 +0000 +0000 -…/30 65 2262-04-11 23:47:16.854776 +0000 +0000 + …/20 64 2262-04-11 23:47:16.854776 +0000 +0000 +…/20 …/30 65 2262-04-11 23:47:16.854776 +0000 +0000 +…/30 66 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 63 1 2262-04-11 23:47:16.854776 +0000 +0000 -…/20 …/30 64 1 2262-04-11 23:47:16.854776 +0000 +0000 -…/30 65 1 2262-04-11 23:47:16.854776 +0000 +0000 + …/20 64 1 2262-04-11 23:47:16.854776 +0000 +0000 +…/20 …/30 65 1 2262-04-11 23:47:16.854776 +0000 +0000 +…/30 66 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 60f610cd5e99..c5f06d2a02ce 100644 --- a/pkg/sql/logictest/testdata/logic_test/show_source +++ b/pkg/sql/logictest/testdata/logic_test/show_source @@ -267,118 +267,121 @@ SELECT * FROM [SHOW SEQUENCES FROM system] sequence_schema sequence_name public descriptor_id_seq public role_id_seq +public tenant_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 comments table NULL NULL +public database_role_settings table NULL NULL 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 -public span_stats_unique_keys table NULL NULL -public job_info table NULL NULL +public descriptor_id_seq sequence NULL NULL +public eventlog table NULL NULL public external_connections table NULL NULL +public job_info table NULL NULL +public jobs table NULL NULL +public join_tokens table NULL NULL +public lease table NULL NULL +public locations table NULL NULL +public migrations table NULL NULL +public namespace table NULL NULL public privileges table NULL NULL -public tenant_settings table NULL NULL +public protected_ts_meta table NULL NULL +public protected_ts_records table NULL NULL +public rangelog table NULL NULL +public replication_constraint_stats table NULL NULL +public replication_critical_localities table NULL NULL +public replication_stats table NULL NULL +public reports_meta table NULL NULL public role_id_seq sequence NULL NULL +public role_members table NULL NULL +public role_options table NULL NULL +public scheduled_jobs table NULL NULL +public settings table NULL NULL public span_configurations table NULL NULL +public span_stats_buckets table NULL NULL +public span_stats_samples table NULL NULL +public span_stats_tenant_boundaries table NULL NULL +public span_stats_unique_keys 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_activity table NULL NULL -public transaction_activity 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 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 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 task_payloads table NULL NULL +public tenant_id_seq sequence 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 descriptor_id_seq sequence NULL NULL -public settings table NULL NULL -public zones table NULL NULL +public transaction_activity table NULL NULL +public transaction_statistics table NULL NULL +public ui table NULL NULL public users table NULL NULL +public web_sessions table NULL NULL +public zones 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 comments table NULL NULL · +public database_role_settings table NULL NULL · 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 · -public span_stats_unique_keys table NULL NULL · -public job_info table NULL NULL · +public descriptor_id_seq sequence NULL NULL · +public eventlog table NULL NULL · public external_connections table NULL NULL · +public job_info table NULL NULL · +public jobs table NULL NULL · +public join_tokens table NULL NULL · +public lease table NULL NULL · +public locations table NULL NULL · +public migrations table NULL NULL · +public namespace table NULL NULL · public privileges table NULL NULL · -public tenant_settings table NULL NULL · +public protected_ts_meta table NULL NULL · +public protected_ts_records table NULL NULL · +public rangelog table NULL NULL · +public replication_constraint_stats table NULL NULL · +public replication_critical_localities table NULL NULL · +public replication_stats table NULL NULL · +public reports_meta table NULL NULL · public role_id_seq sequence NULL NULL · +public role_members table NULL NULL · +public role_options table NULL NULL · +public scheduled_jobs table NULL NULL · +public settings table NULL NULL · public span_configurations table NULL NULL · +public span_stats_buckets table NULL NULL · +public span_stats_samples table NULL NULL · +public span_stats_tenant_boundaries table NULL NULL · +public span_stats_unique_keys 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 statement_activity table NULL NULL · -public transaction_activity 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_activity table NULL NULL · +public statement_bundle_chunks 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 statement_statistics 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 task_payloads table NULL NULL · +public tenant_id_seq sequence 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 descriptor_id_seq sequence NULL NULL · -public settings table NULL NULL · -public zones table NULL NULL · +public transaction_activity table NULL NULL · +public transaction_statistics table NULL NULL · +public ui table NULL NULL · public users table NULL NULL · +public web_sessions table NULL NULL · +public zones table NULL NULL · query ITTT colnames SELECT node_id, user_name, application_name, active_queries @@ -485,7 +488,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/61 /Max {1} 1 +/Table/62 /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 ec74368fc5c9..57d82ab6e680 100644 --- a/pkg/sql/logictest/testdata/logic_test/split_at +++ b/pkg/sql/logictest/testdata/logic_test/split_at @@ -10,7 +10,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t 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) @@ -24,7 +24,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE t 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 diff --git a/pkg/sql/logictest/testdata/logic_test/system b/pkg/sql/logictest/testdata/logic_test/system index 2ec71f669396..f86cbd9e6cb6 100644 --- a/pkg/sql/logictest/testdata/logic_test/system +++ b/pkg/sql/logictest/testdata/logic_test/system @@ -52,6 +52,7 @@ 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_id_seq sequence NULL NULL public tenant_settings table NULL NULL public tenant_tasks table NULL NULL public tenant_usage table NULL NULL @@ -171,6 +172,7 @@ SELECT id FROM system.descriptor ORDER BY 1 59 60 61 +62 100 101 102 @@ -634,6 +636,8 @@ 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_id_seq admin SELECT true +system public tenant_id_seq root SELECT true system public tenant_settings admin DELETE true system public tenant_settings admin INSERT true system public tenant_settings admin SELECT true diff --git a/pkg/sql/logictest/testdata/logic_test/system_namespace b/pkg/sql/logictest/testdata/logic_test/system_namespace index 3ae02c274b26..b442b39e4f8f 100644 --- a/pkg/sql/logictest/testdata/logic_test/system_namespace +++ b/pkg/sql/logictest/testdata/logic_test/system_namespace @@ -47,6 +47,7 @@ SELECT * FROM system.namespace 1 29 statement_statistics 42 1 29 table_statistics 20 1 29 task_payloads 58 +1 29 tenant_id_seq 62 1 29 tenant_settings 50 1 29 tenant_tasks 59 1 29 tenant_usage 45 diff --git a/pkg/sql/logictest/testdata/logic_test/tenant b/pkg/sql/logictest/testdata/logic_test/tenant index 370c6beae33a..e9bcbf9d2994 100644 --- a/pkg/sql/logictest/testdata/logic_test/tenant +++ b/pkg/sql/logictest/testdata/logic_test/tenant @@ -376,6 +376,11 @@ CREATE TENANT othertenant LIKE system # Create some "interesting" tenant template. statement ok CREATE TENANT tmpl; + +let $tmplid +SELECT id FROM system.tenants WHERE name = 'tmpl' + +statement ok ALTER TENANT tmpl GRANT CAPABILITY can_view_node_info; -- will be copied ALTER TENANT tmpl SET CLUSTER SETTING trace.debug.enable = true; -- will be copied -- Simulate resource limits. Will be copied. @@ -384,7 +389,7 @@ ALTER TENANT tmpl SET CLUSTER SETTING trace.debug.enable = true; -- will be copi INSERT INTO system.tenant_usage( tenant_id, instance_id, next_instance_id, last_update, ru_burst_limit, ru_refill_rate, ru_current, current_share_sum, total_consumption) -VALUES ((SELECT id FROM system.tenants WHERE name = 'tmpl'), 0, 0, now(), +VALUES ($tmplid, 0, 0, now(), 11, 22, 33, 44, ''::BYTES); ALTER TENANT tmpl START SERVICE SHARED; -- will not be copied. @@ -392,11 +397,14 @@ ALTER TENANT tmpl START SERVICE SHARED; -- will not be copied. statement ok CREATE TENANT othertenant LIKE tmpl +let $otherid +SELECT id FROM system.tenants WHERE name = 'othertenant' + # Verify the service mode was not copied. -query ITTT -SHOW TENANT othertenant +query BTTT +SELECT id = $otherid, name, data_state, service_mode FROM [SHOW TENANT othertenant] ---- -13 othertenant ready none +true othertenant ready none # Verify the new tenant has the same caps as the template # (by showing there's no difference between the two) @@ -417,7 +425,7 @@ query IIRRRRI SELECT instance_id, next_instance_id, ru_burst_limit, ru_refill_rate, ru_current, current_share_sum, length(total_consumption) -FROM system.tenant_usage WHERE tenant_id = (SELECT id FROM system.tenants WHERE name = 'othertenant') +FROM system.tenant_usage WHERE tenant_id = $otherid ---- 0 0 11 22 33 0 0 @@ -439,11 +447,14 @@ SET CLUSTER SETTING sql.create_tenant.default_template = 'tmpl'; statement ok CREATE TENANT othertenant +let $otherid +SELECT id FROM system.tenants WHERE name = 'othertenant' + # Verify the service mode was not copied. -query ITTT -SHOW TENANT othertenant +query BTTT +SELECT id = $otherid, name, data_state, service_mode FROM [SHOW TENANT othertenant] ---- -14 othertenant ready none +true othertenant ready none query TT SELECT capability_name, capability_value FROM [SHOW TENANT tmpl WITH CAPABILITIES] @@ -462,7 +473,7 @@ query IIRRRRI SELECT instance_id, next_instance_id, ru_burst_limit, ru_refill_rate, ru_current, current_share_sum, length(total_consumption) -FROM system.tenant_usage WHERE tenant_id = (SELECT id FROM system.tenants WHERE name = 'othertenant') +FROM system.tenant_usage WHERE tenant_id = $otherid ---- 0 0 11 22 33 0 0 @@ -491,4 +502,3 @@ RESET disable_drop_tenant statement ok DROP TENANT nodelete - diff --git a/pkg/sql/logictest/testdata/logic_test/tenant_builtins b/pkg/sql/logictest/testdata/logic_test/tenant_builtins index 5fc7996fb937..cfd43f009612 100644 --- a/pkg/sql/logictest/testdata/logic_test/tenant_builtins +++ b/pkg/sql/logictest/testdata/logic_test/tenant_builtins @@ -38,7 +38,7 @@ SELECT crdb_internal.create_tenant(10, 'tenant-number-ten') query I SELECT crdb_internal.create_tenant('tenant-number-eleven') ---- -2 +11 query IBTIITT colnames SELECT @@ -54,9 +54,9 @@ ORDER BY id ---- id active name data_state service_mode deprecated_data_state dropped_name 1 true system 1 2 READY · -2 true tenant-number-eleven 1 0 READY · 5 true tenant-5 1 0 READY · 10 true tenant-number-ten 1 0 READY · +11 true tenant-number-eleven 1 0 READY · # Check we can add a name where none existed before. statement ok @@ -67,9 +67,9 @@ SELECT id, active, name FROM system.tenants ORDER BY id ---- id active name 1 true system -2 true tenant-number-eleven 5 true my-tenant 10 true tenant-number-ten +11 true tenant-number-eleven # Check we can change the name when there was one before. @@ -103,9 +103,9 @@ SELECT id, active, name FROM system.tenants ORDER BY id ---- id active name 1 true system -2 true tenant-number-eleven 5 true my-new-tenant-name 10 true tenant-number-ten +11 true tenant-number-eleven # Garbage collect a non-drop tenant fails. @@ -131,9 +131,9 @@ ORDER BY id ---- id active name data_state service_mode deprecated_data_state dropped_name 1 true system 1 2 READY · -2 true tenant-number-eleven 1 0 READY · 5 false NULL 2 0 DROP my-new-tenant-name 10 true tenant-number-ten 1 0 READY · +11 true tenant-number-eleven 1 0 READY · # Try to recreate an existing tenant. @@ -248,8 +248,8 @@ ORDER BY id ---- id active name data_state service_mode deprecated_data_state dropped_name 1 true system 1 2 READY · -2 true tenant-number-eleven 1 0 READY · 10 true tenant-number-ten 1 0 READY · +11 true tenant-number-eleven 1 0 READY · query error tenant resource limits require a CCL binary SELECT crdb_internal.update_tenant_resource_limits(10, 1000, 100, 0, now(), 0) @@ -271,10 +271,85 @@ DROP TENANT [1] statement error only users with the admin role are allowed to gc tenant SELECT crdb_internal.gc_tenant(314) -subtest regression_97873 - user root +subtest avoid_tenant_id_reuse + +# Check what is the last tenant ID assigned according to the tenant ID sequence. +query I +SELECT last_value FROM system.tenant_id_seq +---- +11 + +# Remove the last tenant with IMMEDIATE, which ensures the record is immediately +# removed. Then create another one. +statement ok +DROP TENANT [11] IMMEDIATE; +CREATE TENANT anothertenant + +query ITI +SELECT id, name, data_state FROM system.tenants ORDER BY id +---- +1 system 1 +10 tenant-number-ten 1 +12 anothertenant 1 + +# Check the sequence was updated. +query I +SELECT last_value FROM system.tenant_id_seq +---- +12 + +# Now force a tenant with a large ID, "a la" serverless. +statement ok +SELECT crdb_internal.create_tenant(123) + +# Check the sequence was updated. +query I +SELECT last_value FROM system.tenant_id_seq +---- +123 + +# Check that the next tenant created picks up a higher ID. +statement ok +CREATE TENANT yetanotherone + +# Check the sequence was updated. +query I +SELECT last_value FROM system.tenant_id_seq +---- +124 + +query ITI +SELECT id, name, data_state FROM system.tenants ORDER BY id +---- +1 system 1 +10 tenant-number-ten 1 +12 anothertenant 1 +123 tenant-123 1 +124 yetanotherone 1 + +subtest multiple_tenants_in_txn + +statement ok +BEGIN; +SELECT crdb_internal.create_tenant(200); +CREATE TENANT hello; +COMMIT + +query ITI +SELECT id, name, data_state FROM system.tenants ORDER BY id +---- +1 system 1 +10 tenant-number-ten 1 +12 anothertenant 1 +123 tenant-123 1 +124 yetanotherone 1 +200 tenant-200 1 +201 hello 1 + +subtest regression_97873 + # Verify that destroy_tenant works even in the default service mode, # for compatibility with CC serverless. query I @@ -304,3 +379,8 @@ query I SELECT crdb_internal.create_tenant('{"name":"tenant-number-ten", "if_not_exists": true}'::JSONB) ---- NULL + +subtest avoid_too_large_ids + +query error tenant ID 10000000000 out of range +SELECT crdb_internal.create_tenant(10000000000) diff --git a/pkg/sql/opt/exec/execbuilder/testdata/autocommit b/pkg/sql/opt/exec/execbuilder/testdata/autocommit index 2fe4909d2bb3..fc5d711f4334 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 r62: sending batch 1 CPut, 1 EndTxn to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 2 CPut, 1 EndTxn to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 2 CPut to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 2 CPut, 1 EndTxn to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 2 CPut, 1 EndTxn to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 2 CPut to (n1,s1):1 -dist sender send r62: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 2 CPut to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 Put, 1 EndTxn to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 2 Put, 1 EndTxn to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 2 Put to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 2 Put, 1 EndTxn to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 2 Put to (n1,s1):1 -dist sender send r62: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 2 Put to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 2 Put to (n1,s1):1 -dist sender send r62: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 2 Put to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 Scan to (n1,s1):1 -dist sender send r62: sending batch 2 Put, 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 1 Scan to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 Scan to (n1,s1):1 -dist sender send r62: sending batch 2 Put to (n1,s1):1 +dist sender send r63: sending batch 1 Scan to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 Scan to (n1,s1):1 -dist sender send r62: sending batch 2 Put, 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 1 Scan to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 Scan to (n1,s1):1 -dist sender send r62: sending batch 2 Put to (n1,s1):1 -dist sender send r62: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 1 Scan to (n1,s1):1 +dist sender send r63: sending batch 2 Put to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 Scan to (n1,s1):1 -dist sender send r62: sending batch 2 Put to (n1,s1):1 -dist sender send r62: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 1 Scan to (n1,s1):1 +dist sender send r63: sending batch 2 Put to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 Del, 1 EndTxn to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 DelRng, 1 EndTxn to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 DelRng to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 Scan to (n1,s1):1 -dist sender send r62: sending batch 2 Del, 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 1 Scan to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 Scan to (n1,s1):1 -dist sender send r62: sending batch 2 Del to (n1,s1):1 -dist sender send r62: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 1 Scan to (n1,s1):1 +dist sender send r63: sending batch 2 Del to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 Scan to (n1,s1):1 -dist sender send r62: sending batch 2 Del to (n1,s1):1 -dist sender send r62: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 1 Scan to (n1,s1):1 +dist sender send r63: sending batch 2 Del to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 2 CPut to (n1,s1):1 -dist sender send r62: sending batch 2 Get to (n1,s1):1 -dist sender send r62: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 2 CPut to (n1,s1):1 +dist sender send r63: sending batch 2 Get to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 Scan to (n1,s1):1 -dist sender send r62: sending batch 1 Put to (n1,s1):1 -dist sender send r62: sending batch 1 Scan to (n1,s1):1 -dist sender send r62: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 1 Scan to (n1,s1):1 +dist sender send r63: sending batch 1 Put to (n1,s1):1 +dist sender send r63: sending batch 1 Scan to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 Get to (n1,s1):1 -dist sender send r62: sending batch 1 Del to (n1,s1):1 -dist sender send r62: sending batch 1 Scan to (n1,s1):1 -dist sender send r62: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 1 Get to (n1,s1):1 +dist sender send r63: sending batch 1 Del to (n1,s1):1 +dist sender send r63: sending batch 1 Scan to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 Del to (n1,s1):1 -dist sender send r62: sending batch 1 Scan to (n1,s1):1 -dist sender send r62: sending batch 1 Del, 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 1 Del to (n1,s1):1 +dist sender send r63: sending batch 1 Scan to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 2 CPut to (n1,s1):1 -dist sender send r62: sending batch 2 CPut to (n1,s1):1 -dist sender send r62: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 2 CPut to (n1,s1):1 +dist sender send r63: sending batch 2 CPut to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 2 CPut to (n1,s1):1 -dist sender send r62: sending batch 2 CPut to (n1,s1):1 -dist sender send r62: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r63: sending batch 2 CPut to (n1,s1):1 +dist sender send r63: sending batch 2 CPut to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 CPut, 1 EndTxn to (n1,s1):1 +dist sender send r63: 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 e6e93be67568..439d1e00213e 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 r62: sending batch 1 DelRng to (n1,s1):1 +dist sender send r63: sending batch 1 DelRng to (n1,s1):1 delete range DelRange /Table/110/1/601/0 - /Table/110/2 -dist sender send r62: sending batch 1 DelRng to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 Del, 1 EndTxn to (n1,s1):1 +dist sender send r63: 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 r62: sending batch 1 DelRng to (n1,s1):1 +dist sender send r63: 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 57fc9c7eff00..74acd832ae1b 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/dist_vectorize +++ b/pkg/sql/opt/exec/execbuilder/testdata/dist_vectorize @@ -30,7 +30,7 @@ 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 f45bbdb764ab..65ef00a9a104 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_agg +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_agg @@ -18,7 +18,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE d 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 40ed5ae3d183..dc4af37aa06e 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_distinct_on +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_distinct_on @@ -48,7 +48,7 @@ SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE x 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 ee7df7d19e06..94331a9c47dc 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_group_join +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_group_join @@ -18,7 +18,7 @@ SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE d 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 e218306fd7ed..90e4752c53a1 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_indexjoin +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_indexjoin @@ -17,7 +17,7 @@ SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM INDEX t 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 17fad78718b1..045b9f92403c 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 d0e093c7e4a8..8bd316c93a5b 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_join +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_join @@ -18,7 +18,7 @@ SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE d 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 7f137ad05bb8..40ef6ca010af 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join @@ -107,7 +107,7 @@ SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE p ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1/8 {1} 1 + …/1/8 {1} 1 …/1/16 …/1/24 {1} 1 …/1/24 …/1/32 {1} 1 …/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 0a214f3c84c0..dd4ce1b09f9f 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_misc +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_misc @@ -73,7 +73,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE d 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 42be31592cc8..b83bc2376692 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_numtables +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_numtables @@ -28,14 +28,14 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE N 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 bbd2a174630a..de7b56eb8ccf 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_ordinality +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_ordinality @@ -25,7 +25,7 @@ SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE x 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 01f95af7b5d0..a1d493a1c7c2 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 efb18c7f772e..4ffb28c0967c 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_union +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_union @@ -23,7 +23,7 @@ SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE x 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 37fb8e34f525..7156e991474b 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_window +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_window @@ -18,7 +18,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE d 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 2747175ee685..816cf46042b7 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/experimental_distsql_planning_5node +++ b/pkg/sql/opt/exec/execbuilder/testdata/experimental_distsql_planning_5node @@ -23,7 +23,7 @@ SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE k 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 5836821755b5..6667608916db 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/explain_analyze_plans +++ b/pkg/sql/opt/exec/execbuilder/testdata/explain_analyze_plans @@ -37,7 +37,7 @@ SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE k 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 55085123ef8c..538da0aac3c5 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/inverted_filter_geospatial_dist +++ b/pkg/sql/opt/exec/execbuilder/testdata/inverted_filter_geospatial_dist @@ -104,7 +104,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM INDEX g 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? @@ -174,7 +174,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM INDEX g 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 @@ -246,7 +246,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM INDEX g ORDER BY 1 ---- start_key end_key replicas lease_holder - …/1152921574000000000 {2} 2 + …/1152921574000000000 {2} 2 …/1152921574000000000 {2} 2 query ITTTI colnames,rowsort @@ -254,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 -62 {2} 2 +63 {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 b70a4826312a..aa6eca37f8bf 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 8d10bceccd80..47fb903871c3 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 afa2d87a440e..58111b6f552d 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 12bd1116872c..73741f9d1fee 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 9ce601848382..6c3e24c2da38 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/lookup_join +++ b/pkg/sql/opt/exec/execbuilder/testdata/lookup_join @@ -429,7 +429,7 @@ SELECT start_key, end_key, replicas, lease_holder from [SHOW RANGES FROM TABLE d 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 3795ddd87c2f..6fb1dfd086c5 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 96fd02222f89..72dd3ad7351a 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/scan_parallel +++ b/pkg/sql/opt/exec/execbuilder/testdata/scan_parallel @@ -18,7 +18,7 @@ SELECT start_key, end_key, replicas, lease_holder FROM [SHOW RANGES FROM TABLE d 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 822b53a04fb7..b4b0c6d4cbf7 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%' ---- -r63: sending batch 1 CPut, 1 EndTxn to (n1,s1):1 +r64: 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 r63: sending batch 1 CPut to (n1,s1):1 -dist sender send r63: sending batch 1 EndTxn to (n1,s1):1 -dist sender send r63: sending batch 2 CPut, 1 EndTxn to (n1,s1):1 +dist sender send r64: sending batch 1 CPut to (n1,s1):1 +dist sender send r64: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r64: 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 r63: sending batch 4 CPut, 1 EndTxn to (n1,s1):1 -dist sender send r63: sending batch 5 CPut to (n1,s1):1 -dist sender send r63: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r64: sending batch 4 CPut, 1 EndTxn to (n1,s1):1 +dist sender send r64: sending batch 5 CPut to (n1,s1):1 +dist sender send r64: 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 r63: sending batch 6 CPut to (n1,s1):1 -dist sender send r63: sending batch 6 CPut to (n1,s1):1 -dist sender send r63: sending batch 6 CPut to (n1,s1):1 -dist sender send r63: sending batch 6 CPut to (n1,s1):1 -dist sender send r63: sending batch 1 EndTxn to (n1,s1):1 +dist sender send r64: sending batch 6 CPut to (n1,s1):1 +dist sender send r64: sending batch 6 CPut to (n1,s1):1 +dist sender send r64: sending batch 6 CPut to (n1,s1):1 +dist sender send r64: sending batch 6 CPut to (n1,s1):1 +dist sender send r64: 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 r63: sending batch 42 Get to (n1,s1):1 +dist sender send r64: sending batch 42 Get to (n1,s1):1 diff --git a/pkg/sql/sem/catconstants/constants.go b/pkg/sql/sem/catconstants/constants.go index df130188feb8..56e2aa9b4eac 100644 --- a/pkg/sql/sem/catconstants/constants.go +++ b/pkg/sql/sem/catconstants/constants.go @@ -51,6 +51,7 @@ const ( ZonesTableName SystemTableName = "zones" SettingsTableName SystemTableName = "settings" DescIDSequenceTableName SystemTableName = "descriptor_id_seq" + TenantIDSequenceTableName SystemTableName = "tenant_id_seq" TenantsTableName SystemTableName = "tenants" LeaseTableName SystemTableName = "lease" EventLogTableName SystemTableName = "eventlog" diff --git a/pkg/sql/sequence.go b/pkg/sql/sequence.go index 5a94eb87ac2b..85b3ddb1f260 100644 --- a/pkg/sql/sequence.go +++ b/pkg/sql/sequence.go @@ -372,10 +372,16 @@ func MakeSequenceKeyVal( func (p *planner) GetSequenceValue( ctx context.Context, codec keys.SQLCodec, desc catalog.TableDescriptor, ) (int64, error) { - if desc.GetSequenceOpts() == nil { + if !desc.IsSequence() { return 0, errors.New("descriptor is not a sequence") } - keyValue, err := p.txn.Get(ctx, codec.SequenceKey(uint32(desc.GetID()))) + return getSequenceValueFromDesc(ctx, p.txn, codec, desc) +} + +func getSequenceValueFromDesc( + ctx context.Context, txn *kv.Txn, codec keys.SQLCodec, desc catalog.TableDescriptor, +) (int64, error) { + keyValue, err := txn.Get(ctx, codec.SequenceKey(uint32(desc.GetID()))) if err != nil { return 0, err } diff --git a/pkg/sql/stats/automatic_stats_test.go b/pkg/sql/stats/automatic_stats_test.go index 5b235dcf6b82..568eb3273557 100644 --- a/pkg/sql/stats/automatic_stats_test.go +++ b/pkg/sql/stats/automatic_stats_test.go @@ -829,7 +829,9 @@ func TestAnalyzeSystemTables(t *testing.T) { for _, tableName := range tableNames { // Stats may not be collected on system.lease and system.table_statistics. if tableName == "lease" || tableName == "table_statistics" || - tableName == "jobs" || tableName == "scheduled_jobs" || tableName == "role_id_seq" || + tableName == "jobs" || tableName == "scheduled_jobs" || + tableName == "role_id_seq" || + tableName == "tenant_id_seq" || tableName == "descriptor_id_seq" { continue } diff --git a/pkg/sql/tenant_creation.go b/pkg/sql/tenant_creation.go index f3d41fa86909..bd68f9cf6910 100644 --- a/pkg/sql/tenant_creation.go +++ b/pkg/sql/tenant_creation.go @@ -14,6 +14,7 @@ import ( "context" gojson "encoding/json" "fmt" + "math" "strings" "time" @@ -28,11 +29,13 @@ import ( "github.com/cockroachdb/cockroach/pkg/spanconfig" "github.com/cockroachdb/cockroach/pkg/sql/catalog" "github.com/cockroachdb/cockroach/pkg/sql/catalog/bootstrap" + "github.com/cockroachdb/cockroach/pkg/sql/catalog/descs" "github.com/cockroachdb/cockroach/pkg/sql/catalog/systemschema" "github.com/cockroachdb/cockroach/pkg/sql/isql" "github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgcode" "github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgerror" "github.com/cockroachdb/cockroach/pkg/sql/rowenc" + "github.com/cockroachdb/cockroach/pkg/sql/sem/catconstants" "github.com/cockroachdb/cockroach/pkg/sql/sem/tree" "github.com/cockroachdb/cockroach/pkg/sql/sessiondata" "github.com/cockroachdb/cockroach/pkg/util/hlc" @@ -60,6 +63,14 @@ func (p *planner) CreateTenant( } } + if ctcfg.ID != nil && *ctcfg.ID > math.MaxUint32 { + // Tenant creation via this interface (which includes + // crdb_internal.create_tenant) should be prevented from gobbling + // up the entire tenant ID space by asking for too large values. + // Otherwise, CREATE TENANT will not be possible any more. + return tid, pgerror.Newf(pgcode.ProgramLimitExceeded, "tenant ID %d out of range", *ctcfg.ID) + } + configTemplate := mtinfopb.TenantInfoWithUsage{} return p.createTenantInternal(ctx, ctcfg, &configTemplate) @@ -130,6 +141,7 @@ func (p *planner) createTenantInternal( info, initialTenantZoneConfig, ctcfg.IfNotExists, + p.ExecCfg().TenantTestingKnobs, ); err != nil { return tid, err } else if !resultTid.IsSet() { @@ -249,6 +261,7 @@ func CreateTenantRecord( info *mtinfopb.TenantInfoWithUsage, initialTenantZoneConfig *zonepb.ZoneConfig, ifNotExists bool, + testingKnobs *TenantTestingKnobs, ) (roachpb.TenantID, error) { const op = "create" if err := rejectIfCantCoordinateMultiTenancy(codec, op); err != nil { @@ -268,7 +281,7 @@ func CreateTenantRecord( tenID := info.ID if tenID == 0 { - tenantID, err := getAvailableTenantID(ctx, info.Name, txn) + tenantID, err := getAvailableTenantID(ctx, info.Name, txn, settings, testingKnobs) if err != nil { if pgerror.GetPGCode(err) == pgcode.DuplicateObject && ifNotExists { // IF NOT EXISTS: no error if the tenant already existed. @@ -281,6 +294,14 @@ func CreateTenantRecord( info.ID = tenID } + // Update the ID sequence if available. + // We only keep the latest ID. + if settings.Version.IsActive(ctx, clusterversion.V23_1_TenantIDSequence) { + if err := updateTenantIDSequence(ctx, txn, info.ID); err != nil { + return roachpb.TenantID{}, err + } + } + if info.Name == "" { // No name: generate one if we are at the appropriate version. if settings.Version.IsActive(ctx, clusterversion.V23_1TenantNamesStateAndServiceMode) { @@ -499,26 +520,77 @@ func CreateTenantRecord( func (p *planner) GetAvailableTenantID( ctx context.Context, tenantName roachpb.TenantName, ) (roachpb.TenantID, error) { - return getAvailableTenantID(ctx, tenantName, p.InternalSQLTxn()) + return getAvailableTenantID(ctx, tenantName, p.InternalSQLTxn(), p.ExecCfg().Settings, p.ExecCfg().TenantTestingKnobs) } -// getAvailableTenantID returns the first available ID that can be assigned to -// the created tenant. Note, this ID could have previously belonged to another -// tenant that has since been dropped and gc'ed. -func getAvailableTenantID( +// getAvailableTenantIDWithReuse is a variant of getAvailableTenantID that +// reuses tenant IDs that have been previously deleted. This is useful for +// testing. +func getAvailableTenantIDWithReuse( ctx context.Context, tenantName roachpb.TenantName, txn isql.Txn, ) (roachpb.TenantID, error) { - // Find the first available ID that can be assigned to the created tenant. - // Note, this ID could have previously belonged to another tenant that has - // since been dropped and gc'ed. + // The WHERE clause is responsible for checking for duplicate names. row, err := txn.QueryRowEx(ctx, "next-tenant-id", txn.KV(), - sessiondata.NodeUserSessionDataOverride, ` - SELECT id+1 AS newid + sessiondata.NodeUserSessionDataOverride, `SELECT id+1 AS newid FROM (VALUES (1) UNION ALL SELECT id FROM system.tenants) AS u(id) WHERE NOT EXISTS (SELECT 1 FROM system.tenants t WHERE t.id=u.id+1) AND ($1 = '' OR NOT EXISTS (SELECT 1 FROM system.tenants t WHERE t.name=$1)) - ORDER BY id LIMIT 1 -`, tenantName) + ORDER BY id LIMIT 1`, tenantName) + if err != nil { + return roachpb.TenantID{}, err + } + if row == nil { + return roachpb.TenantID{}, pgerror.Newf(pgcode.DuplicateObject, + "tenant with name %q already exists", tenantName) + } + nextIDFromTable := uint64(*row[0].(*tree.DInt)) + + return roachpb.MakeTenantID(nextIDFromTable) +} + +// getAvailableTenantID returns the next available ID that can be assigned to +// the created tenant. +func getAvailableTenantID( + ctx context.Context, + tenantName roachpb.TenantName, + txn isql.Txn, + settings *cluster.Settings, + testingKnobs *TenantTestingKnobs, +) (roachpb.TenantID, error) { + if testingKnobs != nil && testingKnobs.EnableTenantIDReuse { + return getAvailableTenantIDWithReuse(ctx, tenantName, txn) + } + + // We really want to use different tenant IDs every time, to avoid + // tenant ID reuse. For this, we have a sequence system.tenant_id_seq. + // + // However, there are two obstacles that prevent us from using only the + // sequence. + // + // The first is that the sequence is added in a migration and at the + // point this function is called the migration may not have been + // run yet. + // + // Separately, we also have the function + // crdb_internal.create_tenant() which can define an arbitrary tenant + // ID. + // + // So we proceed as follows: + // - we find the maximum tenant ID that has been used so far. This covers + // cases where the migration has not been run yet and also arbitrary + // ID selection by create_tenant(). + // - we also find the next value of the sequence, if it exists already. + // - we take the maximum of the two values (plus one) as the next ID. + // - we also update the sequence with the new value we've chosen (in + // createTenantInternal above). + // + + // The HAVING clause is responsible for checking for duplicate names. + row, err := txn.QueryRowEx(ctx, "next-tenant-id", txn.KV(), + sessiondata.NodeUserSessionDataOverride, + `SELECT max(id)+1 AS newid FROM system.tenants +HAVING ($1 = '' OR NOT EXISTS (SELECT 1 FROM system.tenants t WHERE t.name = $1))`, + tenantName) if err != nil { return roachpb.TenantID{}, err } @@ -526,8 +598,89 @@ func getAvailableTenantID( return roachpb.TenantID{}, pgerror.Newf(pgcode.DuplicateObject, "tenant with name %q already exists", tenantName) } - nextID := *row[0].(*tree.DInt) - return roachpb.MustMakeTenantID(uint64(nextID)), nil + nextIDFromTable := uint64(*row[0].(*tree.DInt)) + + // Is the sequence available yet? + var lastIDFromSequence int64 + if settings.Version.IsActive(ctx, clusterversion.V23_1_TenantIDSequence) { + lastIDFromSequence, err = getTenantIDSequenceValue(ctx, txn) + if err != nil { + return roachpb.TenantID{}, err + } + } + + nextID := nextIDFromTable + if uint64(lastIDFromSequence+1) > nextIDFromTable { + nextID = uint64(lastIDFromSequence + 1) + } + + return roachpb.MakeTenantID(nextID) +} + +var tenantIDSequenceFQN = tree.MakeTableNameWithSchema(catconstants.SystemDatabaseName, tree.PublicSchemaName, tree.Name(catconstants.TenantIDSequenceTableName)) + +// getTenantIDSequenceDesc retrieves a leased descriptor for the +// sequence system.tenant_id_seq. +func getTenantIDSequenceDesc(ctx context.Context, txn isql.Txn) (catalog.TableDescriptor, error) { + // We piece through the isql.Txn here to get access to the + // descs.Collection, which provides caching and leasing. Without it, + // we'd need to do a raw namespace lookup, which is generally + // frowned upon. + // + // All this is needed because this function cannot be a method of + // planner, as it is called from the (standalone) + // CreateTenantRecord() function. + itxn, ok := txn.(*internalTxn) + if !ok { + return nil, errors.AssertionFailedf("expected internalTxn, got %T", txn) + } + coll := itxn.Descriptors() + + // Full name of the sequence. + // Look up the sequence by name with lease. + _, desc, err := descs.PrefixAndTable(ctx, coll.ByNameWithLeased(txn.KV()).Get(), &tenantIDSequenceFQN) + if err != nil { + return nil, err + } + // Sanity check. + if !desc.IsSequence() { + return nil, errors.AssertionFailedf("tenant ID generator is not a sequence") + } + return desc, nil +} + +// getTenantIDSequenceValue retrieves the current value of system.tenant_id_seq. +func getTenantIDSequenceValue(ctx context.Context, txn isql.Txn) (int64, error) { + desc, err := getTenantIDSequenceDesc(ctx, txn) + if err != nil { + return 0, err + } + return getSequenceValueFromDesc(ctx, txn.KV(), keys.SystemSQLCodec, desc) +} + +// updateTenantIDSequence sets the current value of +// system.tenant_id_seq to the specified argument if it is currently +// lower; otherwise is a no-op. +func updateTenantIDSequence(ctx context.Context, txn isql.Txn, newID uint64) error { + desc, err := getTenantIDSequenceDesc(ctx, txn) + if err != nil { + return err + } + curVal, err := getSequenceValueFromDesc(ctx, txn.KV(), keys.SystemSQLCodec, desc) + if err != nil { + return err + } + + if newID > uint64(curVal) { + seqValueKey, newVal, err := MakeSequenceKeyVal(keys.SystemSQLCodec, desc, int64(newID), true /* isCalled */) + if err != nil { + return err + } + if err := txn.KV().Put(ctx, seqValueKey, newVal); err != nil { + return err + } + } + return nil } // generateTenantClusterSettingKV generates the kv to be written to the store diff --git a/pkg/sql/tests/system_table_test.go b/pkg/sql/tests/system_table_test.go index 02f008e3ae3f..6ed8df58a43a 100644 --- a/pkg/sql/tests/system_table_test.go +++ b/pkg/sql/tests/system_table_test.go @@ -52,7 +52,7 @@ func TestInitialKeys(t *testing.T) { var nonDescKeys int if systemTenant { codec = keys.SystemSQLCodec - nonDescKeys = 15 + nonDescKeys = 16 } else { codec = keys.MakeSQLCodec(roachpb.MustMakeTenantID(5)) nonDescKeys = 4 diff --git a/pkg/sql/tests/testdata/initial_keys b/pkg/sql/tests/testdata/initial_keys index 9aefffd6be48..1c041751c794 100644 --- a/pkg/sql/tests/testdata/initial_keys +++ b/pkg/sql/tests/testdata/initial_keys @@ -1,6 +1,6 @@ initial-keys tenant=system ---- -117 keys: +120 keys: /System/"desc-idgen" /Table/3/1/1/2/1 /Table/3/1/3/2/1 @@ -53,6 +53,7 @@ initial-keys tenant=system /Table/3/1/59/2/1 /Table/3/1/60/2/1 /Table/3/1/61/2/1 + /Table/3/1/62/2/1 /Table/5/1/0/2/1 /Table/5/1/1/2/1 /Table/5/1/16/2/1 @@ -107,6 +108,7 @@ initial-keys tenant=system /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_id_seq"/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 @@ -118,7 +120,8 @@ 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 -56 splits: + /Table/62/1/0/0 +57 splits: /Table/3 /Table/4 /Table/5 @@ -175,6 +178,7 @@ initial-keys tenant=system /Table/59 /Table/60 /Table/61 + /Table/62 initial-keys tenant=5 ---- diff --git a/pkg/upgrade/upgrades/BUILD.bazel b/pkg/upgrade/upgrades/BUILD.bazel index be549237be5b..74b6159ea21f 100644 --- a/pkg/upgrade/upgrades/BUILD.bazel +++ b/pkg/upgrade/upgrades/BUILD.bazel @@ -32,6 +32,7 @@ go_library( "system_privileges_user_id_migration.go", "system_rbr_indexes.go", "system_statistics_activity.go", + "tenant_id_sequence_for_system_tenant.go", "tenant_table_migration.go", "upgrades.go", "wait_for_del_range_in_gc_job.go", @@ -120,6 +121,7 @@ go_test( "system_privileges_user_id_migration_test.go", "system_rbr_indexes_test.go", "system_statistics_activity_test.go", + "tenant_id_sequence_for_system_tenant_test.go", "tenant_table_migration_test.go", "wait_for_del_range_in_gc_job_test.go", "wait_for_schema_changes_test.go", diff --git a/pkg/upgrade/upgrades/tenant_id_sequence_for_system_tenant.go b/pkg/upgrade/upgrades/tenant_id_sequence_for_system_tenant.go new file mode 100644 index 000000000000..75ec94466038 --- /dev/null +++ b/pkg/upgrade/upgrades/tenant_id_sequence_for_system_tenant.go @@ -0,0 +1,26 @@ +// 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 upgrades + +import ( + "context" + + "github.com/cockroachdb/cockroach/pkg/clusterversion" + "github.com/cockroachdb/cockroach/pkg/keys" + "github.com/cockroachdb/cockroach/pkg/sql/catalog/systemschema" + "github.com/cockroachdb/cockroach/pkg/upgrade" +) + +func tenantIDSequenceForSystemTenant( + ctx context.Context, _ clusterversion.ClusterVersion, d upgrade.SystemDeps, +) error { + return createSystemTable(ctx, d.DB.KV(), d.Settings, keys.SystemSQLCodec, systemschema.TenantIDSequence) +} diff --git a/pkg/upgrade/upgrades/tenant_id_sequence_for_system_tenant_test.go b/pkg/upgrade/upgrades/tenant_id_sequence_for_system_tenant_test.go new file mode 100644 index 000000000000..cf00ffec19cd --- /dev/null +++ b/pkg/upgrade/upgrades/tenant_id_sequence_for_system_tenant_test.go @@ -0,0 +1,81 @@ +// 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 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/sql" + "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/require" +) + +func TestTenantIDSequenceForSystemTenant(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.BinaryMinSupportedVersionKey), + BootstrapVersionKeyOverride: clusterversion.BinaryMinSupportedVersionKey, + }, + }, + }, + } + + var ( + ctx = context.Background() + + tc = testcluster.StartTestCluster(t, 1, clusterArgs) + s = tc.Server(0) + sqlDB = tc.ServerConn(0) + ) + defer tc.Stopper().Stop(ctx) + require.True(t, s.ExecutorConfig().(sql.ExecutorConfig).Codec.ForSystemTenant()) + + // Advance to the version immediately before the one that + // interests us. + upgrades.Upgrade( + t, + sqlDB, + clusterversion.V23_1_TenantIDSequence-1, + nil, + false, + ) + + // Check that the sequence does not exist. + var seqVal int + err := sqlDB.QueryRow(`SELECT last_value FROM system.public.tenant_id_seq`).Scan(&seqVal) + require.Error(t, err) + + // Introduce the sequence. + upgrades.Upgrade( + t, + sqlDB, + clusterversion.V23_1_TenantIDSequence, + nil, + false, + ) + + err = sqlDB.QueryRow(`SELECT last_value FROM system.public.tenant_id_seq`).Scan(&seqVal) + require.NoError(t, err) + require.Equal(t, 1, seqVal) +} diff --git a/pkg/upgrade/upgrades/upgrades.go b/pkg/upgrade/upgrades/upgrades.go index 7ae7a0fe48f3..6cf4bf722d07 100644 --- a/pkg/upgrade/upgrades/upgrades.go +++ b/pkg/upgrade/upgrades/upgrades.go @@ -305,6 +305,11 @@ var upgrades = []upgradebase.Upgrade{ upgrade.NoPrecondition, alterPayloadColumnToNullable, ), + upgrade.NewSystemUpgrade( + "create system.tenant_id_seq", + toCV(clusterversion.V23_1_TenantIDSequence), + tenantIDSequenceForSystemTenant, + ), } func init() { diff --git a/pkg/util/rangedesc/testdata/scoped_iteration b/pkg/util/rangedesc/testdata/scoped_iteration index 80577c35770a..08d58490a1e1 100644 --- a/pkg/util/rangedesc/testdata/scoped_iteration +++ b/pkg/util/rangedesc/testdata/scoped_iteration @@ -61,35 +61,36 @@ scan - r59:/Table/5{8-9} - r60:/Table/{59-60} - r61:/Table/6{0-1} -- r62:/{Table/61-Max} -scan through /M{in-ax} (page-size=1) found 62/62 descriptors +- r62:/Table/6{1-2} +- r63:/{Table/62-Max} +scan through /M{in-ax} (page-size=1) found 63/63 descriptors scan scope=1 ---- - r2:/System/NodeLiveness{-Max} -scan through /System/NodeLiveness{-Max} (page-size=1) found 1/62 descriptors +scan through /System/NodeLiveness{-Max} (page-size=1) found 1/63 descriptors scan scope=2 ---- - r4:/System{/tsd-tse} -scan through /System{/tsd-tse} (page-size=1) found 1/62 descriptors +scan through /System{/tsd-tse} (page-size=1) found 1/63 descriptors scan scope=3 ---- - r1:/{Meta1/-System/NodeLiveness} -scan through /M{in-eta2/} (page-size=1) found 1/62 descriptors +scan through /M{in-eta2/} (page-size=1) found 1/63 descriptors scan scope=4 ---- - r1:/{Meta1/-System/NodeLiveness} -scan through /{Meta1/-System} (page-size=1) found 1/62 descriptors +scan through /{Meta1/-System} (page-size=1) found 1/63 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/62 descriptors +scan through /Table/{3-6} (page-size=1) found 3/63 descriptors scan scope=6 ---- @@ -103,7 +104,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/62 descriptors +scan through /Table/{38-48} (page-size=1) found 10/63 descriptors scan scope=7 ---- @@ -163,5 +164,6 @@ scan scope=7 - r59:/Table/5{8-9} - r60:/Table/{59-60} - r61:/Table/6{0-1} -- r62:/{Table/61-Max} -scan through /Table/{0-Max} (page-size=1) found 57/62 descriptors +- r62:/Table/6{1-2} +- r63:/{Table/62-Max} +scan through /Table/{0-Max} (page-size=1) found 58/63 descriptors diff --git a/pkg/util/rangedesc/testdata/scoped_iteration_with_page_size b/pkg/util/rangedesc/testdata/scoped_iteration_with_page_size index c3f4380f413f..502d58b75d03 100644 --- a/pkg/util/rangedesc/testdata/scoped_iteration_with_page_size +++ b/pkg/util/rangedesc/testdata/scoped_iteration_with_page_size @@ -61,18 +61,19 @@ scan page-size=3 - r59:/Table/5{8-9} - r60:/Table/{59-60} - r61:/Table/6{0-1} -- r62:/{Table/61-Max} -scan through /M{in-ax} (page-size=3) found 62/62 descriptors +- r62:/Table/6{1-2} +- r63:/{Table/62-Max} +scan through /M{in-ax} (page-size=3) found 63/63 descriptors scan scope=1 page-size=5 ---- - r2:/System/NodeLiveness{-Max} -scan through /System/NodeLiveness{-Max} (page-size=5) found 1/62 descriptors +scan through /System/NodeLiveness{-Max} (page-size=5) found 1/63 descriptors scan scope=1 page-size=500 ---- - r2:/System/NodeLiveness{-Max} -scan through /System/NodeLiveness{-Max} (page-size=500) found 1/62 descriptors +scan through /System/NodeLiveness{-Max} (page-size=500) found 1/63 descriptors scan scope=6 page-size=4 ---- @@ -86,4 +87,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/62 descriptors +scan through /Table/{38-48} (page-size=4) found 10/63 descriptors diff --git a/pkg/util/rangedesc/testdata/scoped_iteration_with_splits b/pkg/util/rangedesc/testdata/scoped_iteration_with_splits index bcb918c6a843..61f3e8055a15 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/} -- r63:/Meta2/{-middle} -- r64:/{Meta2/middle-System/NodeLiveness} +- r64:/Meta2/{-middle} +- r65:/{Meta2/middle-System/NodeLiveness} - r2:/System/NodeLiveness{-Max} - r3:/System/{NodeLivenessMax-tsd} - r4:/System{/tsd-tse} @@ -69,19 +69,20 @@ scan - r59:/Table/5{8-9} - r60:/Table/{59-60} - r61:/Table/6{0-1} -- r62:/{Table/61-Max} -scan through /M{in-ax} (page-size=1) found 64/64 descriptors +- r62:/Table/6{1-2} +- r63:/{Table/62-Max} +scan through /M{in-ax} (page-size=1) found 65/65 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/64 descriptors +scan through /M{in-eta2/} (page-size=1) found 1/65 descriptors # Scanning through both meta{1,2} does surface these descriptors. scan scope=4 page-size=2 ---- - r1:/Meta{1/-2/} -- r63:/Meta2/{-middle} -- r64:/{Meta2/middle-System/NodeLiveness} -scan through /{Meta1/-System} (page-size=2) found 3/64 descriptors +- r64:/Meta2/{-middle} +- r65:/{Meta2/middle-System/NodeLiveness} +scan through /{Meta1/-System} (page-size=2) found 3/65 descriptors