COPY FROM : out of memory - Mailing list pgsql-general

From Arnaud Lesauvage
Subject COPY FROM : out of memory
Date
Msg-id 4565723E.2050307@freesurf.fr
Whole thread Raw
Responses Re: COPY FROM : out of memory  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi list !

When trying to import a 20M rows csv file into PostgreSQL, I
get :

ERROR: out of memory
État SQL :53200
Détail :Failed on request of size 1073741823.
Contexte : COPY tmp, line 1

The table has no index, no trigger, ... :

CREATE TABLE tmp
(
   c1 bigint,
   c2 character varying,
   c3 character varying
)
WITHOUT OIDS;
ALTER TABLE tmp OWNER TO postgres;

The COPY command is very basic :
SET client_encoding TO UTF8;
COPY tmp FROM
'E:\\Production\\Temp\\detailrechercheutf8.csv' CSV;

PostgreSQL version is :
"PostgreSQL 8.1.5 on i686-pc-mingw32, compiled by GCC
gcc.exe (GCC) 3.4.2 (mingw-special)"

I have ~1.5GB of RAM available, and ~4GB of free pagefile space.

Something wrong in my postgresql.conf ? I didn't do much
tweaking though...

Regards
--
Arnaud

pgsql-general by date:

Previous
From: Benjamin Smith
Date:
Subject: Re: Postgres Team: Thank You All
Next
From: Tom Lane
Date:
Subject: Re: OID Perfomance - Object-Relational databases