database "vaultwarden" has a collation version mismatch #1627

Closed
opened 2026-02-05 01:22:33 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @Stunt0265 on GitHub (Jul 5, 2023).

Running the latest version of Vaultwarden on Docker on Synology NAS. Using latest version of Postgres, 15.3-1.pgdg120+1.

Just started getting this today:

WARNING: database "vaultwarden" has a collation version mismatch DETAIL: The database was created using collation version 2.31, but the operating system provides version 2.36. HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE vaultwarden REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.

Originally created by @Stunt0265 on GitHub (Jul 5, 2023). Running the latest version of Vaultwarden on Docker on Synology NAS. Using latest version of Postgres, 15.3-1.pgdg120+1. Just started getting this today: WARNING: database "vaultwarden" has a collation version mismatch DETAIL: The database was created using collation version 2.31, but the operating system provides version 2.36. HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE vaultwarden REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
Author
Owner

@tessus commented on GitHub (Jul 5, 2023):

https://github.com/dani-garcia/vaultwarden/wiki/Using-the-MariaDB-%28MySQL%29-Backend#foreign-key-errors-collation-and-charset

Edit: Scratch that. You are not using MySQL.

@tessus commented on GitHub (Jul 5, 2023): ~https://github.com/dani-garcia/vaultwarden/wiki/Using-the-MariaDB-%28MySQL%29-Backend#foreign-key-errors-collation-and-charset~ Edit: Scratch that. You are not using MySQL.
Author
Owner

@BlackDex commented on GitHub (Jul 5, 2023):

I actually doubt it's a Vaultwarden issue. You probably updated your OS which caused this. The message also looks like it's coming from the PostgreSQL server.

I suggest to read the following https://www.postgresql.org/docs/current/sql-altercollation.html

@BlackDex commented on GitHub (Jul 5, 2023): I actually doubt it's a Vaultwarden issue. You probably updated your OS which caused this. The message also looks like it's coming from the PostgreSQL server. I suggest to read the following https://www.postgresql.org/docs/current/sql-altercollation.html
Author
Owner

@Stunt0265 commented on GitHub (Jul 5, 2023):

Running this on a NAS and the only OS upgrade would have been Synology OS at some point. And maybe the Postgres docker container.

@Stunt0265 commented on GitHub (Jul 5, 2023): Running this on a NAS and the only OS upgrade would have been Synology OS at some point. And maybe the Postgres docker container.
Author
Owner

@BlackDex commented on GitHub (Jul 5, 2023):

I would guess it would have been the PostgreSQL Docker container then. It probably now uses newer library versions and for that you need to do some manual database upgrading commands.

@BlackDex commented on GitHub (Jul 5, 2023): I would guess it would have been the PostgreSQL Docker container then. It probably now uses newer library versions and for that you need to do some manual database upgrading commands.
Author
Owner

@pparedes1 commented on GitHub (Jul 5, 2023):

I had to login into my postgres database and run the command mentioned in the error to resolve.

  1. docker exec -it postgres /bin/bash where postgres is your container name (if you are running locally not required)
  2. /bin/psql --username=postgres_username where postgres_username is your user for the database
  3. ALTER DATABASE vaultwarden_db REFRESH COLLATION VERSION; output was NOTICE: changing version from 2.31 to 2.36
  4. exit to close session and exit to close access to container
@pparedes1 commented on GitHub (Jul 5, 2023): I had to login into my postgres database and run the command mentioned in the error to resolve. 1) `docker exec -it postgres /bin/bash` where postgres is your container name (if you are running locally not required) 2) `/bin/psql --username=postgres_username` where postgres_username is your user for the database 3) `ALTER DATABASE vaultwarden_db REFRESH COLLATION VERSION;` output was NOTICE: changing version from 2.31 to 2.36 4) `exit` to close session and `exit` to close access to container
Author
Owner

@Stunt0265 commented on GitHub (Jul 5, 2023):

I've tried this multiple times and get no output. Just returns to cursor. I found a similar thread yesterday about Nextcloud.

@Stunt0265 commented on GitHub (Jul 5, 2023): I've tried this multiple times and get no output. Just returns to cursor. I found a similar thread yesterday about Nextcloud.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1627