24 days ago
WARNING: database "railway" has a collation version mismatch
Aug 30 2025 17:08:33
DETAIL: The database was created using collation version 2.36, but the operating system provides version 2.41.
Aug 30 2025 17:08:33
HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE railway REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
2 Replies
24 days ago
Hey there! We've found the following might help you get unblocked faster:
🧵 PostgreSQL Collation Version Mismatch Error on Railway Template (PG 17) When Initializing Directus
If you find the answer from one of these, please let us know by solving the thread!
24 days ago
Hey! Quoting my friend uxuz on this solution:
According to the Postgres docs, you would want to reindex and update the collation version of your Postgres database. This can be done by running REINDEX DATABASE railway;
and ALTER DATABASE railway REFRESH COLLATION VERSION;
. Make sure to backup your database before executing these queries, in case they fail and somehow corrupt the database. Having a backup also allows you to just deploy a new Postgres database and restore the backup to it, this way you have multiple ways to restore your database as opposed to just the one I mentioned first.
His solution helped another user.
I can't stress enough ensure you have a backup of your database even if it is a "safe" command, one that is confirmed to work, it is always a good idea to have a failsafe.