Partition maintenance and inherited tables leave served rows stale
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
调研方向
Start by tracing the DDL trigger and subscription reread or stop behavior, then inspect how table reads are built and how live PostgreSQL tests are organized. Reproduce the listed partition operations and the INHERITS example. Done means clients receive current rows after supported partition changes, ordinary tables are read with FROM ONLY, and live tests cover each operation and an inheritance parent.
由索引模型根据 Issue 内容生成。
描述
Problem
A served table can gain or lose rows without any row change reaching the change feed. Clients keep a stale view until they reconnect.
-
Partition maintenance. With
publish_via_partition_root = true, a partitioned table is served under its root's name. Verified on PostgreSQL 17: these commands send nothing to the feed, although each one changes the root's rows.ALTER TABLE events ATTACH PARTITION events_feb FOR VALUES FROM ('2026-02-01') TO ('2026-03-01'); -- rows appear ALTER TABLE events DETACH PARTITION events_jan; -- rows disappear DROP TABLE events_jan; -- rows disappear TRUNCATE events_jan; -- rows disappearTRUNCATE eventson the root is sent and stops the server.CREATE TABLE … PARTITION OFadds an empty partition and needs nothing. -
Plain inheritance (
INHERITS). Reads of a parent table withoutONLYinclude its child tables' rows. The WAL reports a child's changes under the child's own name, so subscriptions on the parent never see them.CREATE TABLE notes (id int8 PRIMARY KEY, body text); CREATE TABLE pinned_notes () INHERITS (notes); INSERT INTO pinned_notes VALUES (1, 'x'); -- served in `notes`, never updated
Expected behavior
The server never keeps serving rows the parent no longer has, or leaves out rows it now has:
- For partition maintenance, the DDL trigger already fires on
ATTACH,DETACHandDROP. The server should either re-read the affected subscriptions or stop, naming the change. Dropping old partitions is routine for retention, so re-reading is likely the better choice. - A
TRUNCATEof a partition fires no DDL trigger, so it needs another signal (for example, a TRUNCATE trigger on the partitions that emits a WAL message), or a documented limitation. - For inheritance, an ordinary table (
relkind = 'r') is read withFROM ONLY, so its rows match its own changes. Partitioned roots stay as they are, sinceONLYon a partitioned root returns no rows.
Acceptance criteria
-
ATTACH(of a table with rows),DETACHandDROPof a partition of a served table don't leave clients stale. - A
TRUNCATEof a partition is either handled or documented as unsupported. -
CREATE TABLE … PARTITION OFkeeps working without a restart. - Reads of an ordinary table use
FROM ONLY, and a child table's rows no longer appear under its parent. - Live tests cover each partition operation and an inheritance parent.
- 主要语言
- 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 天内回复
-
PgBouncer transaction pooling: `prepare` runs outside the read transaction and can land on another backend可能已有人在做 @sprihaanand-juspay 于 6 天前认领。 未关闭
juspay/streamgres#53 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
juspay/streamgres#49 ·
维护者通常 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 天内回复