Support domain-typed and generated columns in the catalog and change feed
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
调研方向
Start with the catalog startup code that reads column types from information_schema and the DDL trigger snapshot in the schema-change path, and compare how each resolves a domain. Tests for the domain cases and generated columns on PostgreSQL 17 and 18 are the place to confirm behaviour. Done when a schema change on a domain column no longer stops the server and stored generated columns flow on PostgreSQL 18.
由索引模型根据 Issue 内容生成。
描述
Problem
Two kinds of column are not handled correctly today.
- Domain-typed columns. A table with a domain column loads at startup, but any later schema change on that table stops the server, even one unrelated to the column. Startup reads the column's type from
information_schema, which reports the domain's base type (integer, carried asInt). The DDL trigger reports the domain's own name (positive_int), which the schema-change path doesn't recognise, so the column looks like it changed type.
CREATE DOMAIN positive_int AS integer CHECK (VALUE > 0);
CREATE TABLE orders (id int8 PRIMARY KEY, amount positive_int);
ALTER TABLE orders ADD COLUMN note text; -- server stops: `amount` "changed type"
Startup also gets some domain types wrong on its own:
- a domain over another domain is carried as
Stringinstead of its base type; - an array of a domain is carried as
List(String)instead of a list of the base type; - a domain over an array type stops the server on the next schema change.
- Generated columns. Generated columns are left out of the catalog with a startup warning, because PostgreSQL before 18 does not send them in the change feed. Clients can't read, filter or sort on them. PostgreSQL 18 can stream stored generated columns when the publication sets
publish_generated_columns = stored; virtual generated columns are never streamed.
Expected behavior
A domain-typed column should be treated as its base type everywhere: at startup, in the DDL trigger's snapshot, and in schema-change handling, including nested domains and arrays. Generated columns should be served wherever PostgreSQL streams them, and left out with a clear warning where it does not.
Acceptance criteria
- A schema change on a table with a domain-typed column doesn't stop the server.
- Startup and the DDL trigger resolve domains to the same type, including a domain over a domain, an array of a domain, and a domain over an array.
- On PostgreSQL 18 with
publish_generated_columns = stored, stored generated columns are served, and their values follow updates. - Virtual generated columns, and generated columns before PostgreSQL 18, are left out with a warning naming the reason.
- Tests cover each domain case and generated columns on PostgreSQL 17 and 18.
- 主要语言
- Rust
- 星标
- 129
- 派生
- 7
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
juspay/streamgres 的其他 Issue
-
Make the top-L client diff cost depend on what changed, not on the limit可能已有人在做 @SahilKhan101 于 2 天前认领。 未关闭enhancement
juspay/streamgres#64 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Query optimisation: share initial snapshots across LIMIT variants of the same query (donor windows)可能已有人在做 @sprihaanand-juspay 于 3 天前认领。 未关闭
juspay/streamgres#58 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 4/5 一周以上 新手友好度 38/100
juspay/streamgres#56 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
juspay/streamgres#55 ·
维护者通常 1 天内回复
-
PgBouncer transaction pooling: `prepare` runs outside the read transaction and can land on another backend可能已有人在做 @sprihaanand-juspay 于 6 天前认领。 未关闭
juspay/streamgres#53 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 juspay/streamgres 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
area: settings bug Haiku review: no-score ui
难度 2/5 1-3 小时 新手友好度 78/100
MMFoundation/WallpaperMachine#346 ·
维护者通常 1 天内回复
-
Make the HTTP server's keep-alive and headers timeouts configurable可能已有人在做 @mattgodbolt 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
compiler-explorer/compiler-explorer#9902 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 68/100
jonathanong/no-mistakes#5490 ·
-
follow-up
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复