How to connect to a specific machine

I am importing a very large csv file. Over 1GB in size. This is being done with \copy in postgres. I tried proxying my psql client and running the import that way but it just hung. The import on my laptop takes about 40 seconds. Over network it didn’t complete after 45 minutes.

So I ssh’d into the db machine and curld the gzip’d csv then fly postgres into the db. The other day I was able to import the csv as the file was found locally on the same machine. However, today I cannot and I noticed the connecting address is different for ssh and the postgres but to the same app.

Is there a way I can force connection to the same specific machine for both ssh and postgres commands so I can import this file?

You could try selecting the instance that you’re connecting to via ssh by running -s on fly ssh console and seeing if that works. If you’re unsure which instance to connect to, and want to dig in further, you can also run fly ips private to get a list of private IP addresses accessible from within the Fly network

1 Like

I think -s is exactly what I was looking for. Thank you!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.