Skip to content

settings: prevent new sql.defaults cluster settings being added #80324

@rafiss

Description

@rafiss

Is your feature request related to a problem? Please describe.
We are encouraging use of ALTER ROLE to configure session variable defaults, so we should stop adding new sql.defaults cluster settings.

Describe the solution you'd like
Modify the register function in pkg/settings/registry.go. It should check the settings names, and for any NEW sql.defaults cluster setting, it should panic. This means we will need an "allow list" for all the current sql.defaults settings. You can see them in a spreadsheet here: https://docs.google.com/spreadsheets/d/1YMMtE5QcrPngUuNeFTCXi6ZXT7XVxnhMszOhibn7tkI/edit#gid=0

The panic message is intended for CockroachDB developers to see, so should mention that new sql.defaults cluster settings are not needed now that we support the ALTER ROLE ... SET syntax

Epic CRDB-10463

Jira issue: CRDB-15767

Metadata

Metadata

Assignees

Labels

C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions