Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Performance > Re: [PERFORMANC...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 4012 of 4352
Post > Topic >>

Re: [PERFORMANCE] Error loading 37G CSV file "invalid string

by pgsql@[EMAIL PROTECTED] (Shane Ambler) Apr 23, 2008 at 01:01 PM

Adonias Malosso wrote:
> Hi all,
> 

> split --lines=10000000
> 
> And running the copy i receive the error on the 5th file:
> 
> psql:/srv/www/htdocs/im****t/script_q2.sql:122: ERROR:  invalid string
> enlargement request size 65536
> CONTEXT:  COPY temp_q2, line 3509639: ""000000009367276";"4";"DANIEL DO
> CARMO BARROS";"31-Jan-1986";"M";"1";"10";"3162906";"GILSON TEIXEIRA..."
> 
> Any clues?

quote problems from earlier than that?
one missing?
\ at end of field negating the closing quote

I'd keep splitting to help isolate - what control do you have over the 
generation of the data?

Is this one off im****t or ongoing?

> My postgresql version is 8.2.4 the server is running suse linux with
1.5GB
> Sensitive changes in postgresql.conf are:
> 
> shared_buffers = 512MB
> temp_buffers = 256MB
> checkpoint_segments = 60
> 
> IŽd also like to know if thereŽs any way to optimize huge data load in
> operations like these.

Sounds like you are already using copy. Where from? Is the data file on 
the server or a seperate client? (as in reading from the same disk that 
you are writing the data to?)

See if http://pgfoundry.org/projects/pgbulkload/
can help

It depends a lot on what you are doing and what table you are im****ting 
into. Indexes will most likely be the biggest slow down, it is faster to 
create them after the table is filled. Also fk restraints can slow down 
as well.

Is this a live server that will still be working as you load data?

If the db is not in use try dropping all indexes (on the relevant table 
anyway), loading then create indexes.

You can copy into a temp table without indexes then select into the 
target table.

What fk restraints does this table have? Can they be safely deferred 
during the im****t?


-- 

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @[EMAIL PROTECTED]
 http://Sheeky.Biz

-- 
Sent via pgsql-performance mailing list (pgsql-performance@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
 




 3 Posts in Topic:
[PERFORMANCE] Error loading 37G CSV file "invalid string enlarge
malosso@[EMAIL PROTECTED]  2008-04-22 18:05:35 
Re: [PERFORMANCE] Error loading 37G CSV file "invalid string enl
tgl@[EMAIL PROTECTED] (T  2008-04-22 17:55:23 
Re: [PERFORMANCE] Error loading 37G CSV file "invalid string
pgsql@[EMAIL PROTECTED]   2008-04-23 13:01:12 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 9:30:27 CDT 2008.