Postgres collation version mismatch
merc1er
PROOP

3 months ago

Out of the blue, the "collation" version from the Railway Postgres-ssl template changed:

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.
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

This caused my apps to go down.

Is there a way to prevent any type of database upgrades without manual approval?

---

On another note, while restoring my database I noticed that pg_restore was very slow on the Railway Postgres-ssl template, compared to other services (e.g. Aiven or Heroku).

Solved$10 Bounty

8 Replies

Railway
BOT

3 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!


idiegea21
HOBBY

3 months ago

Heyy, I think your Postgres collation mismatch happened because Railway updated the underlying OS/libs. You can fix it by running:

ALTER DATABASE railway REFRESH COLLATION VERSION;

Unfortunately, you can’t really prevent automatic upgrades on Railway’s managed service, as they handle updates for security and stability.

Also, Restore speeds on Railway Postgres can be slow; check these Railway guides for tips on improving performance.


aqib-ansari-ergode
HOBBY

2 months ago

ALTER DATABASE railway REFRESH COLLATION VERSION;

where to run this.

I am not able to find cmd to run this please help


aqib-ansari-ergode

ALTER DATABASE railway REFRESH COLLATION VERSION;where to run this.I am not able to find cmd to run this please help

rrohan419
HOBBY

2 months ago

in db client connect the railway databse
I connect dbeaver
then run
1. REINDEX DATABASE railway;

  1. ALTER DATABASE railway REFRESH COLLATION VERSION;

    and then redeploy the db service


rrohan419
HOBBY

2 months ago

in db client connect the railway database

then run
1. REINDEX DATABASE railway;

  1. ALTER DATABASE railway REFRESH COLLATION VERSION;

    and then redeploy the db service


aqib-ansari-ergode
HOBBY

2 months ago

I have solved all my issue.
I was getting the Same issue.
Thank you Rohan


rrohan419

in db client connect the railway databasethen run 1. REINDEX DATABASE railway;ALTER DATABASE railway REFRESH COLLATION VERSION;and then redeploy the db service

aqib-ansari-ergode
HOBBY

2 months ago

thnks


merc1er
PROOP

2 months ago

REINDEX DATABASE railway;
ALTER DATABASE railway REFRESH COLLATION VERSION;

worked for me.

However I did not find a way to prevent automatic database updates.


Status changed to Solved brody about 2 months ago


Loading...