-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: remove default CREATE privilege on public schema [compat with PG 15] #70266
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLA-sql-privilegesSQL privilege handling and permission checks.SQL privilege handling and permission checks.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Metadata
Metadata
Assignees
Labels
A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLA-sql-privilegesSQL privilege handling and permission checks.SQL privilege handling and permission checks.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Postgres 15 will include this change:
Currently, CockroachDB matches the old Postgres behavior, but since we want our privileges to be more compatible with Postgres, we should adapt this change too. (Let's just make sure that commit doesn't get reverted before PG 15 is released.)
To resolve this issue: change it so non-superuser accounts are not able to create tables in the
publicschema of databases they don't own. Make sure to updateremapPublicSchemasin backupccl/restore_job.go too. This should be controlled by a cluster setting, which defaults to keeping the old behavior.This should be the new behavior:
Jira issue: CRDB-10011
Epic CRDB-26874