2 months ago
When I try to import data into my database on postgress from local db, railway get stuck, and I need to kill all running process in order to use the db again.
I noticed this is happening when I try to import more than 10 registers into my table.
When I import 10 registers, it works fine
Does anyone know what could be happening?
It gets stuck until I get a time out.
Attachments
3 Replies
2 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!
2 months ago
I'd suggest you to use tools like tableplus to import data, it make life easier
2 months ago
From the attached screenshot (correct me if I am wrong) it looks like you're SSH'ing into the database container and trying to Ctrl+V your data as SQL commands.
There is an easier way of uploading your data into a Postgres instance:
Ensure your Railway Postgres instance has Public Networking enabled (TCP Proxy). If it's not - go to the settings and hit "+ TCP proxy" and input any port or leave the default one. Then apply the changes.
Once the changes applied, look into the service Variables and find the `DATABASE_PUBLIC_URL' value, copy it
Install
pg_restore(i.e. https://www.bytebase.com/reference/postgres/how-to/how-to-install-pgdump-on-mac-ubuntu-centos-windows/ )Run
pg_restore -d "<DATABASE_PUBLIC_URL>" my_database_dump.sqlwhere<DATABASE_PUBLIC_URL>is the value you copied earlier, andmy_database_dump.sqlis your Postgres database dump
Status changed to Solved brody • 2 months ago