Users are experiencing permissions trouble when upgrading their data container in a multi-container setup. pfaffman fixed the issue by running chown -R postgres:postgres /shared/postgres_* inside the container and ALTER USER discourse WITH SUPERUSER; in postgres. This was due to changes in the postgres user and group IDs in the base OS. tgxworld noted that the user and group IDs are now fixed and will not change going forward. To prevent this issue in the future, pfaffman suggested updating the postgres.template.yml to include chown postgres:postgres /shared/postgres_*, as the actual IDs used do not matter.
I recently rebuilt a data container that was 2 years old. The new container expected different permissions than the old one did, presumably because the postgres user and group had new IDs in the current base OS.
I fixed it by running this inside the container:
chown -R postgres:postgres /shared/postgres_*
Maybe in a single-container setup this isn’t necessary because a chown gets done in some other template?
The next rebuild failed because the discourse user was not allowed to enable the pgvector extension. I resolved this by running this query in postgres as the postgres user: