Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot change owner of crdb_internal_region #69714

Closed
electrum opened this issue Sep 1, 2021 · 1 comment · Fixed by #69722
Closed

Cannot change owner of crdb_internal_region #69714

electrum opened this issue Sep 1, 2021 · 1 comment · Fixed by #69722
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-community Originated from the community X-blathers-triaged blathers was able to find an owner

Comments

@electrum
Copy link

electrum commented Sep 1, 2021

CREATE DATABASE foo PRIMARY REGION "us-east1";
ALTER TYPE foo.public.crdb_internal_region OWNER TO abc;
ERROR: "foo.public.crdb_internal_region" is a multi-region enum and can't be modified using the alter type command
SQLSTATE: 42809
HINT: try adding/removing the region using ALTER DATABASE

Changing the owner of the database with ALTER DATABASE ... OWNER TO ... also does not change the owner of crdb_internal_region.

The implication of this is that whatever user/role creates the database must exist for the lifetime of the database -- you can't drop the user/role without first dropping the database.

@electrum electrum added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Sep 1, 2021
@blathers-crl
Copy link

blathers-crl bot commented Sep 1, 2021

Hello, I am Blathers. I am here to help you get the issue triaged.

It looks like you have not filled out the issue in the format of any of our templates. To best assist you, we advise you to use one of these templates.

I have CC'd a few people who may be able to assist you:

  • @cockroachdb/sql-schema (found keywords: ALTER DATABASE)

If we have not gotten back to your issue within a few business days, you can try the following:

  • Join our community slack channel and ask on #cockroachdb.
  • Try find someone from here if you know they worked closely on the area and CC them.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-community Originated from the community X-blathers-triaged blathers was able to find an owner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant