COPY problem

From: "Creager, Robert S" <CreagRS(at)LOUISVILLE(dot)STORTEK(dot)COM>
To: "'General - PGSQL'" <pgsql-general(at)postgresql(dot)org>
Subject: COPY problem
Date: 2001-03-09 21:34:40
Message-ID: 10FE17AD5F7ED31188CE002048406DE8514CEE@lsv-msg06.stortek.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I think this is a question regarding the backend, but...

I'm in the process of changing 1 large table (column wise) into 6 smaller
tables, and ran into a situation. I'm using Postgresql 7.1beta5, Pg as
included, Perl 5.6, Solaris 2.6 on an Ultra 5.

The new setup is 6 tables, the 'main' table loc with id SERIAL, while the
other 5 (u,b,v,r,i) are identical, id INT4 REFERENCES loc.

What I've done is copy the original table into a file, and am now attempting
to copy from stdin, using Perl/Pg to break out the data into the 6 tables.
I'm working with 2.5 million records btw. I've narrowed the situation to
occur when copying to any one of the 5 referring tables (COPY u FROM stdin).
The backend process which handles the db connection decides that it needs a
whole lot of memory, although in a nice controlled manner. The backend
starts with using 6.5Mb, and at 25000 records copied, it's taken 10Mb and
has slowed down substantially. Needless to say, this COPY will not finish
before running out of memory (estimated 300Mb). When executing the COPY to
the loc table, this problem does not occur. Am I going to have to resort to
inserts for the referring tables?

Robert Creager
Senior Software Engineer
Client Server Library
303.673.2365 V
303.661.5379 F
888.912.4458 P
StorageTek
INFORMATION made POWERFUL

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brent R. Matzelle 2001-03-09 21:36:30 Re: remote dumping of databases
Previous Message Mike Mascari 2001-03-09 21:27:26 RE: How to use locks, for DB noivces?