a month ago
My PostgreSQL service fails before startup at Deploy > Create container.
Service: Postgres-EbqM
Service ID: 0a63c110-cab0-4612-987d-aa37faf649f5
Deployment: 0848cdd1-1d59-4539-8cdd-bf8a9b27c283
Region: iad
The failure happens in about one second while creating the container. The service uses Railway's postgres-ssl:18 image and has an attached volume named postgres-volume-j2Z2. There are older detached volumes in the project that must not be deleted because they may contain the database data. Please identify why the container cannot be created or recover the attached volume.
1 Replies
Status changed to Awaiting Railway Response Railway • about 1 month ago
a month ago
Your Postgres-EbqM service has two volumes attached at the same mount path (/var/lib/postgresql/data), and that's what's breaking the deploy. A service can only have one. The two also sit in different regions, so when the container is placed near the first it can't find the second, and creation fails about a second in. That's the "no such file or directory" in your logs: a placement problem, not a damaged disk.
Nothing is lost, and nothing here deletes anything. Both volumes on that service are intact, and so is your older detached postgres-volume.
The fix is one command:
railway volume detach --volume postgres-data-backup
That leaves postgres-volume-j2Z2 attached, keeps every byte on postgres-data-backup, and triggers a redeploy. Run railway volume list first if you want to see both. Please use the CLI rather than the dashboard: the dashboard only offers Delete, not detach, and you have other loose volumes there you don't want to hit by mistake.
One thing worth checking first: Postgres-Production-New has been running fine on its own volume since you created it. If that's your real database now, you can leave Postgres-EbqM alone.
Status changed to Awaiting User Response Railway • about 1 month ago
a month ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 28 days ago