Partition maintenance and inherited tables leave served rows stale
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 129
- Fork
- 7
- Merge medio
- 1g 19h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di juspay/streamgres
-
Make the top-L client diff cost depend on what changed, not on the limitForse già presa @SahilKhan101 l’ha presa 2 giorni fa. Apertaenhancement
juspay/streamgres#64 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Query optimisation: share initial snapshots across LIMIT variants of the same query (donor windows)Forse già presa @sprihaanand-juspay l’ha presa 3 giorni fa. Aperta
juspay/streamgres#58 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 Più di una settimana Idoneità per principianti 38/100
juspay/streamgres#56 ·
I maintainer di solito rispondono entro 1 giorno
-
PgBouncer transaction pooling: `prepare` runs outside the read transaction and can land on another backendForse già presa @sprihaanand-juspay l’ha presa 6 giorni fa. Aperta
juspay/streamgres#53 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
juspay/streamgres#49 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di juspay/streamgres
Issue simili
-
Test connection's password prompt says the password is never saved, also for a keychain profileApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
area: settings bug Haiku review: no-score ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MMFoundation/WallpaperMachine#346 ·
I maintainer di solito rispondono entro 1 giorno
-
Make the HTTP server's keep-alive and headers timeouts configurableForse già presa @mattgodbolt l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
compiler-explorer/compiler-explorer#9902 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
jonathanong/no-mistakes#5490 ·
-
follow-up
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno