[BUG] Upgrade from 2.x: compose pins postgres:15, but existing .nostr/data may be PG 16/17/18 (old unpinned postgres image)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker-compose, postgresql, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 829
- フォーク
- 234
- 平均マージ
- 16時間 13分
- マージ済み PR(30日)
- 74
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cameri/nostream のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
Website
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
-
[BUG] LNbits >= 1.0: ISO 8601 time/expiry parsed as unix seconds, paid admissions never confirmedオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
cameri/nostream#927 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
feat(payments): let clients see their subscription tier対応中かも @Priyanshubhartistm が 1 日前に担当しました。 オープンenhancement
cameri/nostream#925 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
cameri/nostream の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
db-ux-design-system/core-web#8613 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
foxglove/mcap#1907 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug internal-plugin pr-welcome upstream
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dsh-tauri-desk/deepseek-harness-desktop#1225 · コメント 1 件 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
unjs/unhead#1027 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信