Postgres Collation Mismatch Blocking n8n Workflows
abraam318
HOBBYOP

5 months ago

Hi Railway Support Team,

I’m using the managed Postgres database named railway in my project. I keep seeing warnings in my logs about a collation version mismatch: the database was created using collation version 2.36, but the operating system provides version 2.41.

Because of this, I cannot use the database in n8n, and all my workflows cannot be opened. Since the database is managed internally, I don’t have direct access to run ALTER DATABASE commands.

Could you please refresh the collation version or migrate the database to fix this mismatch while keeping all my data intact?

This is urgent because it’s blocking my workflows.

Thank you for your help!

$10 Bounty

2 Replies

Railway
BOT

5 months 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!


jack
PRO

5 months ago

Hey there, I'm guessing you're using the built in database editor on the service page on the Railway site, so you may not be able to run SQL queries like the ALTER DATABASE command. Since you probably used a template of/with Postgres, that railway user should have superuser permission, you just need a place to run that query.

I'd suggest temporarily deploying either one of these two templates, https://railway.com/deploy/dbgate, or https://railway.com/deploy/drizzle-studio-gateway. Both are more in-depth database management projects (single-service) that you can easily deploy to your current project, open up in seconds, plug in your connection url, and run that query to hopefully fix any issues you're experiencing. Assuming it resolves the issue, you can always delete the service afterwards if you don't want to keep it.

You should be able to run the following query additionally to check the version and verify the current version and the updated version afterwards.
SELECT datcollversion

FROM pg_database

WHERE datname = 'railway';

After you deploy it, try running ALTER DATABASE railway REFRESH COLLATION VERSION; inside the dashboard on the SQL console to refresh the collation version, then rebuild the affected indexes with REINDEX DATABASE railway;.

Make sure you always backup your production database before running changes like these incase of any unexpected issues. Let me know if this works and resolves the issue.


Loading...