Re: COPY to/from non-local file

Поиск
Список
Период
Сортировка
От Enrico Sirola
Тема Re: COPY to/from non-local file
Дата
Msg-id D9E3083E-5FBD-4CE6-ABBE-7DF2CDA4B8A1@gmail.com
обсуждение исходный текст
Ответ на Re: COPY to/from non-local file  (Jaime Silvela <JSilvela@Bear.com>)
Список 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 по дате отправления:

Предыдущее
От: "Jasbinder Singh Bali"
Дата:
Сообщение: timestamp wiht time zone
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: timestamp wiht time zone