Stream sync generates an empty `FOR TABLE` clause for a standalone Patroni slot
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 76/100
调研方向
从 pkg/cluster/streams.go 中链接行 125–140 和 380–422 附近的流同步逻辑开始;追踪独立的 Patroni slot 如何到达 publication 创建流程。检查 PR #2868 中描述的现有行为,以及 pkg/cluster/database.go 中的 SQL 执行路径。完成条件是:在表映射为空且不存在现有 publication 时,slot 仍保留在 slotsToSync 中,并跳过 CREATE PUBLICATION。
由索引模型根据 Issue 内容生成。
描述
Description
When a cluster uses event streams, it can also define a logical replication slot in spec.patroni.slots for a separate consumer. If no stream supplies tables for that slot and no publication with the same name exists, the operator adds the slot with an empty table map and queues a CREATE PUBLICATION statement with an empty table list. PostgreSQL rejects the generated SQL on every sync.
Steps to reproduce
- Install the
FabricEventStreamCRD and configure apostgresqlresource with an active entry inspec.streams. - Add a separate logical replication slot in
spec.patroni.slots(for examplemy_custom_slot: {type: logical, database: foo, plugin: pgoutput}) in databasefoowithout an existing publication namedmy_custom_slot. - During stream sync, the operator executes:
CREATE PUBLICATION "my_custom_slot" FOR TABLE WITH (publish = 'insert, update');
Observed behavior
PostgreSQL rejects the statement with ERROR: syntax error at or near "WITH" (SQLSTATE 42601), and the operator logs a publication creation error on every reconcile.
Expected behavior
When a slot in spec.patroni.slots has no stream tables (len(newTables) == 0) and no existing publication, stream sync should keep the slot in slotsToSync and skip CREATE PUBLICATION. (PR #2868 preserves an existing publication for a standalone slot, whereas this case starts with no publication.)
- 主要语言
- 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 小时 新手友好度 74/100
zalando/postgres-operator#3182 · 1 条评论 ·
维护者通常 2 天内回复
-
dependencies good first issue ui
难度 2/5 1-3 小时 新手友好度 72/100
zalando/postgres-operator#3132 · 3 条评论 ·
维护者通常 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 天内回复