-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql/parser: update CREATE VIRTUAL CLUSTER to support a direct tenant ID
Previously, the CREATE VIRTUAL CLUSTER (or CREATE TENANT) syntax only accepted a tenant name for creating a virtual cluster, with the system automatically generating the tenant ID. However, this approach doesn't work with CockroachDB Cloud's PCR setup, as we need to create a replication stream using an existing tenant ID. To address this, this commit modifies the CREATE VIRTUAL CLUSTER syntax to allow for a direct tenant ID input, enabling the creation of a tenant with a specific ID. While we have crdb_internal.create_tenant(ID) for this purpose, there's no equivalent built-in for creating a replication stream, so we will have to resort to using the CREATE VIRTUAL CLUSTER ... FROM REPLICATION syntax. No release note as this is meant to be used internally only. This change can be removed once we transition away from using tenant IDs in CockroachDB Cloud. Epic: none Release note: None
- Loading branch information
1 parent
dd0f061
commit 356f717
Showing
5 changed files
with
70 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters