I need to know PostgreSQL Railway template pg_dump version

jimin-genieBIZCLASS

a year ago

I followed the steps outlined here to get a periodic DB dump.
https://blog.railway.app/p/automated-postgresql-backups

This is all working fine but when I tried to use the pg_restore from my Mac, I got the following error.

pg_restore: error: unsupported version (1.15) in file header

I did a pg_restore --version and I have this
pg_restore (PostgreSQL) 15.7 (Homebrew)

I thought since they seem to be both 15, it should work but as you can see it doesn't. What is the exactly pg_dump version that was used in that Railway template I used? How do you find this information out?

0 Replies

jimin-genieBIZCLASS

a year ago

3747f720-8c9c-4d81-9b13-1e420ceabd6c


a year ago

it uses pg_dump 16


jimin-genieBIZCLASS

a year ago

Ah ok. The actual Postgres DB when I run SELECT version(); shows

PostgreSQL 15.5 (Ubuntu 15.5-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit

So in this case

  • pg_dump 16 was used to dump PostgreSQL 15

  • I need to use pg_restore 16 to restore the dumped PostgreSQL 15

Do I understand this correctly?


a year ago

correct


jimin-genieBIZCLASS

a year ago

Thank you it's working now.


a year ago

no problem!


I need to know PostgreSQL Railway template pg_dump version - Railway Help Station