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

sql: prevent tables with PARTITION BY clauses from becoming multi-region #61515

Merged
merged 1 commit into from
Mar 5, 2021

Conversation

otan
Copy link
Contributor

@otan otan commented Mar 4, 2021

Release justification: low-risk update to new functionality
Release note: None

Refs #59719

@otan otan requested review from ajstorm and a team March 4, 2021 23:17
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@ajstorm ajstorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @otan)


pkg/sql/alter_database.go, line 593 at r1 (raw file):

		return pgerror.Newf(
			pgcode.ObjectNotInPrerequisiteState,
			"cannot convert table %s to a multi-region table as it has PARTITION BY defined",

Nit: Do we want to make this a Newf with details? Thinking that the top-line error message should be "cannot convert database %q to a multi-region database", with details "cannot convert table %s...".

also, instead of "as it has PARTITION BY defined", do we just want to say "as it is partitioned"?


pkg/sql/alter_database.go, line 601 at r1 (raw file):

			return pgerror.Newf(
				pgcode.ObjectNotInPrerequisiteState,
				"cannot convert table %s to a multi-region table as it has index/constraint %s with PARTITION BY defined",

Nit: Same comments as above (details, "...defined")

Release justification: low-risk update to new functionality
Release note: None
@otan
Copy link
Contributor Author

otan commented Mar 5, 2021

done!

bors r=ajstorm

@craig
Copy link
Contributor

craig bot commented Mar 5, 2021

Build succeeded:

@craig craig bot merged commit b703e66 into cockroachdb:master Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants