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 curl
d 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?