PostgreSQL Version Mismatch Error
javalex
PROOP

3 months ago

Trying to mount my backup to a new Postgres database, but I got the error below:

2026-03-02 17:39:33.014 UTC [7] DETAIL: The data directory was initialized by PostgreSQL version 16, which is not compatible with this version 17.7 (Debian 17.7-3.pgdg13+1).

$30 Bounty

6 Replies

javalex
PROOP

3 months ago

How to downgrade to version 16 or upgrade my db backup to be compatible.


Railway
BOT

3 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open Railway 3 months ago


javalex

How to downgrade to version 16 or upgrade my db backup to be compatible.

3 months ago

Hey, have you tried to change the source of the Postgres service where you are mounting the backup to ghcr.io/railwayapp-templates/postgres-ssl:16?


uxuz

Hey, have you tried to change the source of the Postgres service where you are mounting the backup to `ghcr.io/railwayapp-templates/postgres-ssl:16`?

javalex
PROOP

3 months ago

How do I do that?


javalex

How do I do that?

In your postgres Service Settings > Source, change the the last number to the postgres version you want.

Attachments


javalex
PROOP

2 months ago

Thanks.

Now postgres not connecting to database. Just started now. internal and external not connecting. No change made on connections. Just not connecting.

Attachments


javalex

Thanks. Now postgres not connecting to database. Just started now. internal and external not connecting. No change made on connections. Just not connecting. ![](https://station-server.railway.com/attachments/att_01kk9dknvmf229cthjwfg6204f)

2 months ago

Hey, can you show the deploy logs of the database in question?


Welcome!

Sign in to your Railway account to join the conversation.

Loading...