Prepared schema creation ignores grant errors and does not retry missing privileges
维护者通常 2 天内回复
还没有人认领这个 Issue。
- #3235 来自 @ritojoao —— 已关闭,未合并
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 68/100
调研方向
Start with execCreateDatabaseSchema() in pkg/cluster/database.go and syncPreparedSchemas() in pkg/cluster/sync.go; trace how default privilege grant errors are handled and how existing schemas are skipped. Check nearby tests for prepared schema synchronization. Done means grant failures are reported and missing privileges are retried on later synchronizations.
由索引模型根据 Issue 内容生成。
描述
Description
When initializing a prepared schema, the operator creates the schema first and then sets its default privileges. If schema creation succeeds but the privilege grant step fails, execCreateDatabaseSchema() ignores the error from execAlterSchemaDefaultPrivileges() and returns nil (pkg/cluster/database.go:453-480).
On subsequent runs, syncPreparedSchemas() checks only whether the schema name already exists and skips existing schemas (pkg/cluster/sync.go:1660-1693). As a result, synchronizations report no errors, and the missing schema USAGE and default table SELECT privileges are never retried.
Steps to reproduce
- Configure a prepared database
schema_db(DefaultUsers=false) with a prepared schemadata(DefaultRoles=false). - Create
schema_dbalong with theschema_db_ownerandschema_db_readerroles, leavingschema_db_writerabsent. - Synchronize prepared schemas. Schema
datais created, while setting its default privileges fails becauseschema_db_writerdoes not exist (and the error is ignored). - Create the missing
schema_db_writerrole and synchronize prepared schemas three more times. - Create a new table in
dataasschema_db_owner:schema_db_readerhas neitherUSAGEon schemadatanorSELECTon the new table.
Expected behavior
Return an error when execAlterSchemaDefaultPrivileges() fails, and retry the missing schema privileges on subsequent synchronizations until setup succeeds.
- 主要语言
- Go
- 星标
- 5.3k
- 派生
- 1.1k
- 平均合并
- 3 天 17 小时
- 30 天内合并 PR
- 11
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
zalando/postgres-operator 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
zalando/postgres-operator#3257 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
zalando/postgres-operator#3254 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
zalando/postgres-operator#3253 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
zalando/postgres-operator#3252 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
zalando/postgres-operator#3182 · 1 条评论 ·
维护者通常 2 天内回复
查看 zalando/postgres-operator 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
[inputs.internal] README lists go_version tag on internal_gather instead of internal_agent可能已有人在做 @cvas22 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 90/100
influxdata/telegraf#20264 ·
维护者通常 1 天内回复
-
[Bug] Standalone migration breaks existing Ingress routes using the envoy-http Service port name未关闭accepted bug wg/enterprise-environment
难度 2/5 1-3 小时 新手友好度 78/100
vllm-project/semantic-router#7483 · 1 条评论 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 64/100
stacklok/toolhive-catalog#2076 ·
维护者通常 1 天内回复
-
vulncheck or vulndb
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复