- v3.5.2 → v3.5.2
- v3.6.0.beta2 → v3.6.0.beta2
このスレッドがこの状況に至りました: Upgrade failed. Database stopped. (multisite install)
現在、データベースへのアクセスに問題があります。
2025-11-02 17:13:51.212 UTC [1975] postgres@c_discourse LOG: provided user name (postgres) and authenticated user name (discourse) do not match
2025-11-02 17:13:51.212 UTC [1975] postgres@c_discourse FATAL: Peer authentication failed for user "postgres"
2025-11-02 17:13:51.212 UTC [1975] postgres@c_discourse DETAIL: Connection matched pg_hba.conf line 89: "local all postgres
peer"
postgres=# \l
List of databases
Name | Owner | Encoding | Locale Provider | Collate | Ctype | ICU Locale | ICU Rules | Access privileges
-------------±---------±---------±----------------±------------±------------±-----------±----------±-----------------------
b_discourse | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | =Tc/postgres +
| | | | | | | | postgres=CTc/postgres +
| | | | | | | | discourse=CTc/postgres
c_discourse | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | =Tc/postgres +
| | | | | | | | postgres=CTc/postgres +
| | | | | | | | discourse=CTc/postgres
discourse | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | =Tc/postgres +
| | | | | | | | postgres=CTc/postgres +
| | | | | | | | discourse=CTc/postgres
postgres | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | |
template0 | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
(6 rows)
multisite.yaml はこれらのバージョン間で変更されました。
Original:
secondsite:
adapter: postgresql
database: b_discourse
pool: 25
timeout: 5000
db_id: 2
host_names:
- ``forum.domain.com
New:
mlp:
adapter: postgresql
database: discourse_mlp
username: discourse_mlp
password: applejack
host: dbhost
pool: 5
timeout: 5000
host_names:
- discourse.nudderdomain.com
- discourse.nudderdomain.internal
マルチサイトを設定した際、パスワードやユーザーは必要なかったり、元のテンプレートに記載されていなかったため、設定していませんでした。
当初、multisite.yml に記載された 2 つのサイトの権限の問題でマルチサイトが失敗したため、アップグレードできませんでした。postgres を multisite.yml のユーザーとして追加しても、マイグレーションには機能しませんでした。今になって、discourse を試すべきだったのかもしれないと気づきました。
オーナーを discourse に変更するだけで問題は解決しますか?マルチサイトが現在と一致するように、ユーザーとパスワードを追加する必要がありますか?
ここに最適な長期的な解決策は何ですか?
