COPY problem

Поиск
Список
Период
Сортировка
Искать

COPY problem

От:
rstp <rstp@linuxwaves.com>
Дата:
I am trying to populate a table using the COPY command, but the command 
keeps failing with a 'Query was cancelled error'. When I re-run the 
exact same command, it usually fails at a different spot, and 
occasionally succeeds. Here's an example:

analytics=# COPY tbl555 FROM '/usr/local/pgsql/xaa' WITH NULL AS '';
ERROR:  copy: line 167641, Query was cancelled.
analytics=# COPY tbl555 FROM '/usr/local/pgsql/xaa' WITH NULL AS '';
ERROR:  copy: line 164863, Query was cancelled.
analytics=# COPY tbl555 FROM '/usr/local/pgsql/xaa' WITH NULL AS '';
ERROR:  copy: line 117599, Query was cancelled.

It is a brand new 7.3.3 database on Debian 3.0 on skookum(tm) hardware 
(p4, 1G ram). Currently there is only one user on the system (me), and 
other apps running are sshd, tomcat, etc, but they're not being used.

I have a text file with approx 20 million records, split into 20 files 
of 1 million records each. I also previously tried with smaller files 
(100,000 records each) with about a 50% probability of the COPY command 
succeeding.

The table itself has 9 columns (3 text, 4 numeric, 1 date) and the data 
in the file is tab delimited. Whenever a problem occurs and I reference 
the line in the file, there is no apparent error, and when I re-run the 
COPY it usually succeeds.

Anyone have any ideas on how I can solve this?

TIA

Ron

FAQ