Re: COPY to/from non-local file - Mailing list pgsql-general

From Enrico Sirola
Subject Re: COPY to/from non-local file
Date
Msg-id D9E3083E-5FBD-4CE6-ABBE-7DF2CDA4B8A1@gmail.com
Whole thread Raw
In response to Re: COPY to/from non-local file  (Jaime Silvela <JSilvela@Bear.com>)
List pgsql-general
Hi,

Il giorno 27/giu/07, alle ore 20:54, Jaime Silvela ha scritto:

The problem is that the getline/readline interface, which does exist for Ruby, doesn't seem to work so well, and anyway operates line by line; I would have preferred to just hand a file descriptor and be done with it.

Thanks for your suggestions too, Erik and Ted. Performance-wise the best solution may be a network mount as you suggest Erik.

I transfer some million rows (for like 20 tables) every day from a server to another.
The two servers are in two separated networks, with different security levels, so unfortunately
network mounts are not available. At the beginning I used to transfer record-by-record within
a python application hosted by the source server, but it took ages. At the end, 
some scripting around ssh proved to be enough. just put the public key file in
the .ssh/authorized_keys of the postgresql system user and you are done. You can transfer 
files without the need for a password, and it's perfectly scriptable
I hope it helps,


pgsql-general by date:

Previous
From: "Jasbinder Singh Bali"
Date:
Subject: timestamp wiht time zone
Next
From: Alvaro Herrera
Date:
Subject: Re: timestamp wiht time zone