I'm having this totally weird scenario: We have an archiving server based on PostgreSQL inside a Scientific Linux virtual server. I want to migrate the data (20+ GB) to a physical Scientific Linux machine, so I used
\copy (select * from table) to '/path/to/file
This ran successfully, and the data is in the output file.
On the physical machine I try to import the data using
\copy table from '/path/to/file'
When I try this command on a terminal emulator, it exits after a few minutes. Also, tried it on the terminal itself after login but after a few minutes it exits, too. In both cases there is no data imported.
Could it be that the server is somehow overloaded? Can we overcome this and import the entire file?
Edit: I increased the RAM to 3 GB, the crash took a bit longer to come.
Edit 2: There is a log file under
/var/lib/pgsql/data/pg_log, this log file has these lines as the last few lines of it:
Context: COPY sample, line 77324116 Statement: COPY sample from STDIN ERROR: Unexpected EOF on client connection Context: COPY sample, line 77324116 Statement: COPY sample from STDIN Log: Could not send data to client: Broken pipe Statement: COPY sample from STDIN ERROR: Unexpected EOF on client connection
Any help is really appreciated!