Skip site navigation (1) Skip section navigation (2)

1 milion data insertion

From: Elielson Fontanezi <ElielsonF(at)prodam(dot)sp(dot)gov(dot)br>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Cc: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: 1 milion data insertion
Date: 2002-07-26 18:34:12
Message-ID: A799F7647794D311924A005004ACEA97080DDEC4@cprodamibs249.prodam (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-sql
Hi fellows!

	I have tried to insert 1.000.000 of record to the following table;

--------------------------------------------------
zakal=# \d teste;
 codigo | bigint                 | not null
 nome   | character varying(100) |
--------------------------------------------------

	and I got these errors:

--------------------------------------------------
zakal$ psql -c "copy teste from 'teste.dat' using delimeters '|'"
ERROR:  parser: parse error at or near "delimeters"
ERROR:  parser: parse error at or near "delimeters"
zakal$ psql -c "copy teste from 'teste.dat' using delimiters '|'"
ERROR:  COPY command, running in backend with effective uid 504, could not
open
file 'teste.dat' for reading.  Errno = No such file or directory (2).
ERROR:  COPY command, running in backend with effective uid 504, could not
open
file 'teste.dat' for reading.  Errno = No such file or directory (2).
zakal$ pwd
/home/zakal/tmp
zakal$ psql -c "copy teste from '`pwd`/teste.dat' using delimiters '|'"
DEBUG:  copy: line 27536, XLogWrite: new log file created - consider
increasing
WAL_FILES
DEBUG:  copy: line 93146, XLogWrite: new log file created - consider
increasing
WAL_FILES
DEBUG:  recycled transaction log file 0000000000000000


ERROR:  copy: line 164723, Bad int8 external representation "16722"
ERROR:  copy: line 164723, Bad int8 external representation "16722"
zakal$
zakal$
zakal$ DEBUG:  recycled transaction log file 0000000000000001
----------------------------------------------------------------------

the log has overflowed.
	
	Ok, this was a test. I'd like to know what would be happen.
	But, from you, great PostGres DBA's, what is the best way to
insert a large number of data?
	Is there a way to turn off the log?
	Is there a way to commit each 100 records?

regards,

..............................................
A Question...
Since before your sun burned hot in space and before your race was born, I
have awaited a question.

Elielson Fontanezi 
DBA Technical Support - PRODAM
+55 11 5080 9493



Responses

pgsql-sql by date

Next:From: Marc SpitzerDate: 2002-07-26 18:46:00
Subject: Re: 1 milion data insertion
Previous:From: Roberto João Lopes GarciaDate: 2002-07-26 18:16:57
Subject: Re: set DateStyle to 'SQL'

pgsql-general by date

Next:From: Marc SpitzerDate: 2002-07-26 18:46:00
Subject: Re: 1 milion data insertion
Previous:From: Janning VygenDate: 2002-07-26 18:09:50
Subject: Re: plpgsql: function throws error on second call!

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group