[BUG] Upgrade from 2.x: compose pins postgres:15, but existing .nostr/data may be PG 16/17/18 (old unpinned postgres image)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- docker-compose, postgresql, typescript
Direzione di ricerca
Read the release notes or upgrade documentation and the compose configuration for nostream-db; the report identifies .nostr/data/PG_VERSION as the way to check the existing cluster version. Start by confirming which PostgreSQL image major and Debian variant the upgrade instructions should use. Done means the upgrade guidance explains how operators can match the image to their existing data directory.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
#393 (for #387) pinned nostream-db to postgres:15. Before that the compose file used the unpinned postgres image, so existing installs created .nostr/data with whatever major version was latest at the time — 16, 17 or 18. After upgrading such an install to 3.x, postgres:15 cannot open the data directory and the relay never starts. The bind mount ${PWD}/.nostr/data is still used, so the old data is picked up — just by the wrong major version.
To Reproduce
- Run nostream 2.x with the old compose (
image: postgres) — e.g. our.nostr/datahasPG_VERSION=17(image was 17.5). git checkout v3.4.1 && docker compose up -d.nostream-dbcannot start, because PostgreSQL refuses a data directory initialized by a newer major ("database files are incompatible with server"), andnostream-migrate/nostreamwait on its healthcheck. (We caught this before starting:.nostr/data/PG_VERSIONsaid 17 while the compose file says 15, so we did not run 15 against the data.)
Expected behavior
Upgrading from 2.x either keeps working or stops with a clear message telling the operator which image to use.
System
- OS: Ubuntu 22.04
- Platform: docker compose v5.4
- Version: 2.1.0 → 3.4.1, data dir PG 17
Workaround we use
docker-compose.override.yml next to the upstream file:
services:
nostream-db:
image: postgres:17.10-bookworm
Note the -bookworm suffix: the old postgres image was Debian 12 based, current postgres:17 is Debian 13 with a newer glibc. Our database uses the libc collation en_US.utf8, and switching glibc versions under an existing cluster can silently invalidate text indexes — so the variant should match the one that created the data.
Suggestion
- an upgrade note in the release notes / docs: check
cat .nostr/data/PG_VERSIONand override the image to that major (same Debian variant) beforedocker compose up; - optionally, the CLI start command could read
PG_VERSIONand refuse to start with a clear message when it does not match the configured image major.
- Lingua principale
- TypeScript
- Stelle
- 829
- Fork
- 234
- Merge medio
- 16h 13m
- PR unite (30g)
- 74
Preparare l'ambiente
- Include un Dockerfile o un 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 cameri/nostream
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
Website
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Upgrade from 2.x: EWMA rate limiter hits WRONGTYPE on sliding-window keys left in RedisAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] LNbits >= 1.0: ISO 8601 time/expiry parsed as unix seconds, paid admissions never confirmedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
cameri/nostream#927 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
feat(payments): let clients see their subscription tierForse già presa @Priyanshubhartistm l’ha presa 2 giorni fa. Apertaenhancement
cameri/nostream#925 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cameri/nostream
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
source-cooperative/docs.source.coop#41 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Nimblesite/SharpLsp#468 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
solidjs-community/solid-primitives#1082 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno