25 days ago
Hello Railway Support Team,
I’m experiencing an issue with my PostgreSQL database on Railway.
The container starts successfully, but I can’t connect properly or query existing tables.
Here’s the log output:
Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/6b82b7c6-0b21-4691-8e8d-a33573ed7ee8/vol_z50vgdr323xeck9j
PostgreSQL Database directory appears to contain a database; Skipping initialization
...
WARNING: database "railway" has a collation version mismatch
DETAIL: The database was created using collation version 2.36, but the operating system provides version 2.41.
ERROR: relation "subscriptions" does not exist at character 15
STATEMENT: SELECT * FROM subscriptions ORDER BY id ASC;
I didn’t change anything in the database configuration — it seems to have persisted volume data, but now PostgreSQL reports a collation version mismatch and can’t find my tables.
I really hope that my databases haven't disappeared because this is a critical issue for me.
I hope that this can be resolved as quickly as possible, because my entire system has crashed.
3 Replies
25 days ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
25 days ago
For the collation mismatch, try running the following SQL queries in a database client such as DataGrip:
ALTER DATABASE <your-database-name> REFRESH COLLATION VERSION;
REINDEX DATABASE <your_database_name>;25 days ago
Hey, what tables are you seeing when you connect to it? From the looks of it, the subscriptions table does not exist.
You can view those tables by either going to the data tab inside your database or by using the database viewer.
Also, are you able to share a screenshot of your PostgreSQL Service?
About the collation mismatch, it shouldn't be an issue that would cause all of your data to be missing, but definitely fix it first.
