Unquoted SQL identifiers in `spec.streams` publication sync and connection pooler lookup
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
Direzione di ricerca
Start with the publication sync in pkg/cluster/streams.go and SQL templates and pooler lookup in pkg/cluster/database.go; compare their identifier handling with role quoting in pkg/util/users/users.go. Check how pg_publication_tables represents identifiers and review existing tests around publication sync and pooler lookup. Done means mixed-case, hyphenated, and reserved-word names work correctly and unchanged publications are not altered on every sync.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When syncing publications for spec.streams, pkg/cluster/streams.go#L116-L124 formats schemaName and tableName without double quotes (fmt.Sprintf("%s.%s", schemaName, tableName)) and interpolates that list directly into CREATE PUBLICATION and ALTER PUBLICATION at pkg/cluster/database.go#L54-L55:
createPublicationSQL = `CREATE PUBLICATION "%s" FOR TABLE %s WITH (publish = 'insert, update');`
alterPublicationSQL = `ALTER PUBLICATION "%s" SET TABLE %s;`
Even though the CRD schema (pkg/apis/acid.zalan.do/v1/crds.go#L533) allows uppercase letters and hyphens in spec.streams[].tables keys, PostgreSQL folds unquoted mixed-case identifiers (such as public.Orders) to lowercase public.orders (ERROR: relation "public.orders" does not exist) and rejects hyphenated or reserved-word table names (such as public.order-events or public.user) with SQLSTATE 42601. Putting literal quotes in the manifest key does not work either because pkg/cluster/database.go#L49-L53 reads unquoted pt.schemaname || '.' || pt.tablename from pg_publication_tables, so currentTables != tableList never matches and re-runs ALTER PUBLICATION on every sync.
Similarly, in the same file at pkg/cluster/database.go#L76-L95, connectionPoolerLookup substitutes {{.pooler_schema}} and {{.pooler_user}} without double quotes (whereas pkg/util/users/users.go#L148 and pkg/cluster/database.go#L70-L74 quote role names), causing PostgreSQL to fold mixed-case pooler role/schema names to lowercase (ERROR: role "..." does not exist) or fail with a syntax error on hyphenated names.
- Lingua principale
- Go
- Stelle
- 5.3k
- Fork
- 1.1k
- Merge medio
- 3g 17h
- PR unite (30g)
- 11
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un 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 zalando/postgres-operator
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
zalando/postgres-operator#3257 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
zalando/postgres-operator#3254 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
zalando/postgres-operator#3253 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
zalando/postgres-operator#3252 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
zalando/postgres-operator#3182 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di zalando/postgres-operator
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
[inputs.internal] README lists go_version tag on internal_gather instead of internal_agentForse già presa @cvas22 l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
influxdata/telegraf#20264 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Standalone migration breaks existing Ingress routes using the envoy-http Service port nameApertaaccepted bug wg/enterprise-environment
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vllm-project/semantic-router#7483 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
stacklok/toolhive-catalog#2076 ·
I maintainer di solito rispondono entro 1 giorno
-
vulncheck or vulndb
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
golang/go#83428 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno