Database access issues after upgrade v3.5.2 -> v3.6.0.beta2

  • v3.5.2 → v3.5.2
  • v3.6.0.beta2 → v3.6.0.beta2

This thread got me to this point: Upgrade failed. Database stopped. (multisite install)

I now have database access issues:


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)


The multisite.yaml changed between these versions.

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

I never set any of the passwords or users for the multisite because it wasn’t required or listed in the original template when I set them up.

Initially I couldn’t upgrade because the multi site failed because of permissions on the two sites listed in multisite.yml. Adding postres as the user to multisite.yml didn’t work for the migration. Now I see maybe I should have tried discourse?

Will simply changing owner to discourse fix it? Do I need to add users and passwords for the multisite to make it match the current?

What is the best LONG TERM FIX here.

Your post is super hard to read, so I have unlisted it Please fix the formatting and I can list it again.

1 Like

Sadly I went to great lengths to make is as comprehensible/coherent as I could.

I know what I mean. :wink:

EDIT: OK, got it. The other forum I use is a tad different. I use triple tics on the line before and after the block. Now I see what is going on. This one the first set of tics inserts a window to paste into. I couldn’t understand why the triple tics wasn’t working and </> wasn’t giving me what I really wanted.

1 Like