pg_dump version different from railway postgres version

I'm on macOS trying to backup my database with:
railway service
railway shell
pg_dump $DATABASE_URL -f latest.dump
railway service
railway shell
pg_dump $DATABASE_URL -f latest.dump
but I'm getting this error:
pg_dump: error: server version: 16.0 (Debian 16.0-1.pgdg120+1); pg_dump version: 14.8 (Homebrew)
pg_dump: error: aborting because of server version mismatch
pg_dump: error: server version: 16.0 (Debian 16.0-1.pgdg120+1); pg_dump version: 14.8 (Homebrew)
pg_dump: error: aborting because of server version mismatch
Solution:
use a pg_dump version compatible with the database in use on railway
Jump to solution
6 Replies
Percy
Percy14mo ago
Project ID: N/A
dwaynemac
dwaynemacOP14mo ago
N/A
Solution
Brody
Brody14mo ago
use a pg_dump version compatible with the database in use on railway
cerwind
cerwind9mo ago
I keep getting this error whenever I do a manual backup because it seems Railway keeps updating their PostgreSQL version which requires me to update mine on my local effecting all my other projects - it would be good to keep it static for a project
Duchess
Duchess7mo ago
New reply sent from Help Station thread:
Is there any progress on this? I am having a similar issue and I don't really know what version my postgres server is
You're seeing this because this thread has been automatically linked to the Help Station thread.
Brody
Brody7mo ago
I'm pretty sure the version is printed in the deployment logs, but using pg_dump / pg_restore version 16 is what you'd want to be using
Want results from more Discord servers?
Add your server